13 embedded-protocol-version = "2.6.0";
15 embedded-protocol = fetchFromGitHub {
18 rev = "refs/tags/embedded-protocol-${embedded-protocol-version}";
19 hash = "sha256-pNQnbOKVxRW9AiPteuO2Gq6ejV5Yd9GTuxZSyC/0SlE=";
22 buildDartApplication rec {
26 src = fetchFromGitHub {
30 hash = "sha256-nj1CCg/eID5dmW/omIGQYNP/uOKNvMzgo3RLBGLULKI=";
33 pubspecLock = lib.importJSON ./pubspec.lock.json;
42 ln -s ${embedded-protocol} build/language
43 HOME="$TMPDIR" buf generate
46 dartCompileFlags = [ "--define=version=${version}" ];
49 homepage = "https://github.com/sass/dart-sass";
50 description = "The reference implementation of Sass, written in Dart";
52 license = licenses.mit;
53 maintainers = with maintainers; [ lelgenio ];
57 inherit embedded-protocol-version embedded-protocol;
58 updateScript = ./update.sh;
60 version = testers.testVersion {
62 command = "dart-sass --version";
65 simple = testers.testEqualContents {
66 assertion = "dart-sass compiles a basic scss file";
67 expected = writeText "expected" ''
70 actual = runCommand "actual"
72 nativeBuildInputs = [ dart-sass ];
73 base = writeText "base" ''
82 dart-sass --style=compressed $base > $out