2023-05-02 01:12:24 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-05-04 23:22:22 +00:00
|
|
|
, buildDartApplication
|
2023-06-07 23:49:08 +00:00
|
|
|
, buf
|
|
|
|
, protoc-gen-dart
|
2023-05-02 01:12:24 +00:00
|
|
|
}:
|
|
|
|
|
2023-06-07 23:49:08 +00:00
|
|
|
let
|
|
|
|
sass-language = fetchFromGitHub {
|
|
|
|
owner = "sass";
|
|
|
|
repo = "sass";
|
|
|
|
rev = "refs/tags/embedded-protocol-2.0.0";
|
|
|
|
hash = "sha256-3qk3XbI/DpNj4oa/3ar5hqEY8LNmQsokinuKt4xV7ck=";
|
|
|
|
};
|
|
|
|
in
|
2023-05-04 23:22:22 +00:00
|
|
|
buildDartApplication rec {
|
2023-05-02 01:12:24 +00:00
|
|
|
pname = "dart-sass";
|
2023-08-11 13:58:40 +00:00
|
|
|
version = "1.65.1";
|
2023-05-02 01:12:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sass";
|
|
|
|
repo = pname;
|
2023-05-04 23:22:22 +00:00
|
|
|
rev = version;
|
2023-08-11 13:58:40 +00:00
|
|
|
hash = "sha256-q6UY+A7JFDYb9hzvr2SYI9GfkY9bg49fQkUM7gHKOBU=";
|
2023-05-02 01:12:24 +00:00
|
|
|
};
|
|
|
|
|
2023-05-04 23:22:22 +00:00
|
|
|
pubspecLockFile = ./pubspec.lock;
|
2023-08-11 13:58:40 +00:00
|
|
|
vendorHash = "sha256-nIiffqM5HwJmORdONz+RADAPTISrz/3/HxK4aOSl5cM=";
|
2023-06-07 23:49:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
buf
|
|
|
|
protoc-gen-dart
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p build
|
|
|
|
ln -s ${sass-language} build/language
|
|
|
|
HOME="$TMPDIR" buf generate
|
|
|
|
'';
|
2023-05-02 01:12:24 +00:00
|
|
|
|
2023-05-30 00:13:23 +00:00
|
|
|
dartCompileFlags = [ "--define=version=${version}" ];
|
2023-05-02 01:12:24 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sass/dart-sass";
|
|
|
|
description = "The reference implementation of Sass, written in Dart";
|
|
|
|
mainProgram = "sass";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lelgenio ];
|
|
|
|
};
|
2023-05-04 23:22:22 +00:00
|
|
|
}
|