sly: add update script

This commit is contained in:
nayeko
2025-01-28 22:42:36 +08:00
parent bd4898dd80
commit fd613da75e
+21
View File
@@ -2,6 +2,11 @@
lib,
fetchFromGitHub,
flutter327,
runCommand,
yq,
sly,
_experimental-update-script-combinators,
gitUpdater,
}:
flutter327.buildFlutterApplication rec {
@@ -22,6 +27,22 @@ flutter327.buildFlutterApplication rec {
install -Dm0644 packaging/linux/page.kramo.Sly.desktop $out/share/applications/sly.desktop
'';
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
nativeBuildInputs = [ yq ];
inherit (sly) src;
}
''
cat $src/pubspec.lock | yq > $out
'';
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "sly.pubspecSource" ./pubspec.lock.json)
];
};
meta = {
description = "Friendly image editor";
homepage = "https://github.com/kra-mo/Sly";