convertall: add updateScript

This commit is contained in:
Luflosi
2026-03-13 11:10:46 +01:00
parent 243fb01ea6
commit 2607b463cc
+25
View File
@@ -2,6 +2,10 @@
lib,
flutter341,
fetchFromGitHub,
runCommand,
nix-update-script,
yq-go,
_experimental-update-script-combinators,
}:
flutter341.buildFlutterApplication rec {
@@ -17,6 +21,27 @@ flutter341.buildFlutterApplication rec {
pubspecLock = lib.importJSON ./pubspec.lock.json;
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
inherit src;
nativeBuildInputs = [ yq-go ];
}
''
yq eval --output-format=json --prettyPrint $src/pubspec.lock > "$out"
'';
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script { })
(
(_experimental-update-script-combinators.copyAttrOutputToFile "convertall.pubspecSource" ./pubspec.lock.json)
// {
supportedFeatures = [ ];
}
)
];
};
meta = {
homepage = "https://convertall.bellz.org";
description = "Graphical unit converter";