build: fix computation of Nix hash for pnpm deps

We have to put a fake hash as pnpmDeps does not fail on change when the
hash is known.
This commit is contained in:
Vincent Bernat
2025-09-18 08:46:17 +02:00
parent a80257496c
commit a2e04a919c
2 changed files with 5 additions and 3 deletions

View File

@@ -97,9 +97,11 @@
[[ -z "$sha256" ]] || echo $sha256 > nix/vendorHash.txt
'';
update-npmDepsHash = ''
sha256=$(2>&1 nix build --no-link .#frontend.npmDeps \
oldSha256=$(cat nix/npmDepsHash.txt)
echo sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= > nix/npmDepsHash.txt
sha256=$(2>&1 nix build --no-link .#frontend.pnpmDeps \
| ${pkgs.gnused}/bin/sed -nE "s/\s+got:\s+(sha256-.*)/\1/p")
[[ -z "$sha256" ]] || echo $sha256 > nix/npmDepsHash.txt
[[ -z "$sha256" ]] && echo $oldSha256 || echo $sha256 > nix/npmDepsHash.txt
'';
update-ianaServiceNamesHash = ''
sha256=$(2>&1 nix build --no-link .#ianaServiceNames \

View File

@@ -1 +1 @@
sha256-4h48BXKE5yY7ZLkW2xYzybuSi6OZDVH7ziCEMfaiPIo=
sha256-01e9HjMU/iGjWw2JoAYcI/hnNm9TEff4codrbe5Dp64=