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 # nix build inputs
lib, lib,
stdenv, stdenv,
concatTextFile,
fetchFromGitHub, fetchFromGitHub,
makeWrapper, makeWrapper,
# deps # deps
@ -80,12 +79,7 @@ in
runHook postInstall runHook postInstall
''; '';
passthru.updateScript = concatTextFile { passthru.updateScript = ./update.sh;
name = "update";
files = [./update.sh];
executable = true;
destination = "/bin/update";
};
meta = { meta = {
mainProgram = "homepage"; 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 { passthru.updateScript = nix-update-script {
extraArgs = [ extraArgs = [
"--flake"
''--version=$(curl -s https://gitlab.com/api/v4/projects/mishakmak%2Fpam-fprint-grosshack/repository/tags | jq -r .[0].name)'' ''--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, jq,
... ...
}: let }: let
inherit (lib) getExe;
inherit (builtins) fromJSON readFile; inherit (builtins) fromJSON readFile;
package = fromJSON (readFile ./package.json); package = fromJSON (readFile ./package.json);
@ -32,7 +33,7 @@ in
npmDepsHash = "sha256-/LWkQwDqU8ISY9v72sn6DmJTro8j18opW75n9ck0jGk="; npmDepsHash = "sha256-/LWkQwDqU8ISY9v72sn6DmJTro8j18opW75n9ck0jGk=";
passthru.updateScript = writeShellApplication { passthru.updateScript = getExe (writeShellApplication {
name = "update"; name = "update";
runtimeInputs = [ runtimeInputs = [
nodejs_latest nodejs_latest
@ -40,7 +41,7 @@ in
jq jq
]; ];
text = import ./update.nix; text = import ./update.nix;
}; });
meta = { meta = {
mainProgram = pname; mainProgram = pname;

View file

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

View file