Merge pull request #248545 from lelgenio/update-dart-sass-1.65.1

dart-sass: 1.64.1 -> 1.65.1
This commit is contained in:
Weijia Wang 2023-08-13 20:27:15 +02:00 committed by GitHub
commit a1bea94f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,10 @@
, buildDartApplication
, buf
, protoc-gen-dart
, testers
, dart-sass
, runCommand
, writeText
}:
let
@ -15,17 +19,17 @@ let
in
buildDartApplication rec {
pname = "dart-sass";
version = "1.64.1";
version = "1.65.1";
src = fetchFromGitHub {
owner = "sass";
repo = pname;
rev = version;
hash = "sha256-JIw1I60Av5hUSRyqhc4nK5x9gHJcHTUIdYBTfQf8ob4=";
hash = "sha256-q6UY+A7JFDYb9hzvr2SYI9GfkY9bg49fQkUM7gHKOBU=";
};
pubspecLockFile = ./pubspec.lock;
vendorHash = "sha256-kGeQIlNTHhlIEFH4MdWF5smc9lLg4YHx11bZS4BTPgI=";
vendorHash = "sha256-nIiffqM5HwJmORdONz+RADAPTISrz/3/HxK4aOSl5cM=";
nativeBuildInputs = [
buf
@ -47,4 +51,31 @@ buildDartApplication rec {
license = licenses.mit;
maintainers = with maintainers; [ lelgenio ];
};
passthru.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;
}
}
'';
} ''
dart-sass --style=compressed $base > $out
'';
};
};
}