about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/dart-sass/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc/dart-sass/default.nix')
-rw-r--r--pkgs/development/tools/misc/dart-sass/default.nix64
1 files changed, 35 insertions, 29 deletions
diff --git a/pkgs/development/tools/misc/dart-sass/default.nix b/pkgs/development/tools/misc/dart-sass/default.nix
index 14fef3a3306af..f4ca641267ffd 100644
--- a/pkgs/development/tools/misc/dart-sass/default.nix
+++ b/pkgs/development/tools/misc/dart-sass/default.nix
@@ -10,22 +10,24 @@
 }:
 
 let
-  sass-language = fetchFromGitHub {
+  embedded-protocol-version = "2.4.0";
+
+  embedded-protocol = fetchFromGitHub {
     owner = "sass";
     repo = "sass";
-    rev = "refs/tags/embedded-protocol-2.3.0";
-    hash = "sha256-J2heASfIwj4lxjsRs/0zRHSaF2tij9bO7IgXp0u/eiI=";
+    rev = "refs/tags/embedded-protocol-${embedded-protocol-version}";
+    hash = "sha256-19YQTda5su2PI2vLzVRCn7fQoH5vEg3539gXEeLLvV8=";
   };
 in
 buildDartApplication rec {
   pname = "dart-sass";
-  version = "1.69.0";
+  version = "1.70.0";
 
   src = fetchFromGitHub {
     owner = "sass";
     repo = pname;
     rev = version;
-    hash = "sha256-kn3cwi1k2CkzbS+Q/JaYy8Nq3Ej0GyWifG1Bq5ZEVHA=";
+    hash = "sha256-JLVcoDAngP1y8EC4K6fIJdPu2Xm8LLAxUm8BTK5tSVk=";
   };
 
   pubspecLock = lib.importJSON ./pubspec.lock.json;
@@ -37,7 +39,7 @@ buildDartApplication rec {
 
   preConfigure = ''
     mkdir -p build
-    ln -s ${sass-language} build/language
+    ln -s ${embedded-protocol} build/language
     HOME="$TMPDIR" buf generate
   '';
 
@@ -51,31 +53,35 @@ buildDartApplication rec {
     maintainers = with maintainers; [ lelgenio ];
   };
 
-  passthru.tests = {
-    version = testers.testVersion {
-      package = dart-sass;
-      command = "dart-sass --version";
-    };
+  passthru = {
+    inherit embedded-protocol-version embedded-protocol;
+    updateScript = ./update.sh;
+    tests = {
+      version = testers.testVersion {
+        package = dart-sass;
+        command = "dart-sass --version";
+      };
 
-    simple = testers.testEqualContents {
-      assertion = "dart-sass compiles a basic scss file";
-      expected = writeText "expected" ''
-        body h1{color:#123}
-      '';
-      actual = runCommand "actual"
-        {
-          nativeBuildInputs = [ dart-sass ];
-          base = writeText "base" ''
-            body {
-              $color: #123;
-              h1 {
-                color: $color;
+      simple = testers.testEqualContents {
+        assertion = "dart-sass compiles a basic scss file";
+        expected = writeText "expected" ''
+          body h1{color:#123}
+        '';
+        actual = runCommand "actual"
+          {
+            nativeBuildInputs = [ dart-sass ];
+            base = writeText "base" ''
+              body {
+                $color: #123;
+                h1 {
+                  color: $color;
+                }
               }
-            }
-          '';
-        } ''
-        dart-sass --style=compressed $base > $out
-      '';
+            '';
+          } ''
+          dart-sass --style=compressed $base > $out
+        '';
+      };
     };
   };
 }