automate npm dependencies hash fetch

This commit is contained in:
Agahnim
2026-05-05 10:29:10 +02:00
parent 6f5d750af9
commit 433417ade2
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,4 @@
{
pkgs ?
import
(fetchTarball "https://github.com/NixOS/nixpkgs/archive/c6d65881c5624c9cae5ea6cedef24699b0c0a4c0.tar.gz")
{ },
pkgs ? import <nixpkgs> { },
}:
pkgs.callPackage ./package.nix { }

4
update-npm-hash.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
hash=$(nix-shell -p prefetch-npm-deps --run "prefetch-npm-deps package-lock.json" 2>/dev/null)
echo "New hash: $hash"
sed -i "s|hash = \"[^\"]*\"|hash = \"$hash\"|" package.nix