fix: make update scripts work with new nix-update

This commit is contained in:
matt1432 2025-04-17 17:44:30 -04:00
parent c816c15c50
commit ac3511da86
6 changed files with 6 additions and 15 deletions
packages
homepage
pam-fprint-grosshack
some-sass-language-server
scopedPackages/lovelace-components/custom-sidebar

View file

@ -2,7 +2,6 @@
# nix build inputs
lib,
stdenv,
concatTextFile,
fetchFromGitHub,
makeWrapper,
# deps
@ -80,12 +79,7 @@ in
runHook postInstall
'';
passthru.updateScript = concatTextFile {
name = "update";
files = [./update.sh];
executable = true;
destination = "/bin/update";
};
passthru.updateScript = ./update.sh;
meta = {
mainProgram = "homepage";

0
packages/homepage/update.sh Normal file → Executable file
View file

View file

@ -73,6 +73,7 @@ in
passthru.updateScript = nix-update-script {
extraArgs = [
"--flake"
''--version=$(curl -s https://gitlab.com/api/v4/projects/mishakmak%2Fpam-fprint-grosshack/repository/tags | jq -r .[0].name)''
];
};

View file

@ -10,6 +10,7 @@
jq,
...
}: let
inherit (lib) getExe;
inherit (builtins) fromJSON readFile;
package = fromJSON (readFile ./package.json);
@ -32,7 +33,7 @@ in
npmDepsHash = "sha256-/LWkQwDqU8ISY9v72sn6DmJTro8j18opW75n9ck0jGk=";
passthru.updateScript = writeShellApplication {
passthru.updateScript = getExe (writeShellApplication {
name = "update";
runtimeInputs = [
nodejs_latest
@ -40,7 +41,7 @@ in
jq
];
text = import ./update.nix;
};
});
meta = {
mainProgram = pname;

View file

@ -38,12 +38,7 @@ in
hash = "sha256-Nuig5vUC0UBic2MK2MNac0iD6N1ZaHZCuolQKVCVWDU=";
};
passthru.updateScript = concatTextFile {
name = "update";
files = [./update.sh];
executable = true;
destination = "/bin/update";
};
passthru.updateScript = ./update.sh;
meta = {
license = lib.licenses.asl20;

View file