plausible: simplify update script

This commit is contained in:
Alexander Sieg
2025-03-04 10:11:53 +01:00
parent 270d0e770b
commit 9ce2c657eb
2 changed files with 19 additions and 17 deletions
+19 -3
View File
@@ -8,6 +8,7 @@
runCommand,
nixosTests,
npm-lockfile-fix,
nix-update-script,
brotli,
tailwindcss_3,
esbuild,
@@ -91,7 +92,9 @@ let
};
};
patchedMixFodDeps = runCommand mixFodDeps.name { } ''
patchedMixFodDeps = runCommand mixFodDeps.name {
inherit (mixFodDeps) hash;
} ''
mkdir $out
cp -r --no-preserve=mode ${mixFodDeps}/. $out
@@ -125,8 +128,21 @@ beamPackages.mixRelease rec {
tests = {
inherit (nixosTests) plausible;
};
updateScript = ./update.sh;
inherit assets tracker;
updateScript = nix-update-script {
extraArgs = [
"-s"
"tracker"
"-s"
"assets"
"-s"
"mjmlNif"
];
};
inherit
assets
tracker
mjmlNif
;
};
env = {
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update jq elixir npm-lockfile-fix nixfmt-rfc-style
set -euxo pipefail
nix-update plausible
version="$(nix-instantiate -A plausible.version --eval --json | jq -r)"
source_url="$(nix-instantiate -A plausible.src.url --eval --json | jq -r)"
nix-update --url "$source_url" --version "$version" plausible.tracker
nix-update --url "$source_url" --version "$version" plausible.assets