romm-mcp: pin the real source and npmDeps hashes
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 25s
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 25s
Both come from the build, and both were non-obvious: - fetchzip hashes the *unpacked* tree, not the .tgz bytes, so a hash computed from the published tarball does not match; the derivation reports the NAR hash of the extracted contents instead. - npmDepsHash only exists once npm has materialised the dependency tree from the committed lockfile. Verified with nix build .#romm-mcp: the derivation builds and ./result/bin/romm-mcp starts and prints 'RomM MCP server running on stdio'.
This commit is contained in:
1 parent
e9dc6f91b7
commit
b55c7af097
1 file changed
+2
-2
@@ -10,7 +10,7 @@ buildNpmPackage rec {
|
|||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://registry.npmjs.org/${pname}/-/${pname}-${version}.tgz";
|
url = "https://registry.npmjs.org/${pname}/-/${pname}-${version}.tgz";
|
||||||
hash = "sha256-Cg4Pa2jxwmMyuc2LyFJA1uNjFgaLaPgMXyvpY2HrPFM=";
|
hash = "sha256-SOYzG0CtNSvIrxOYJq3UDXRlXylqbDjo2f5qfpbiYmI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Upstream publishes no package-lock.json (only package.json), and
|
# Upstream publishes no package-lock.json (only package.json), and
|
||||||
@@ -18,7 +18,7 @@ buildNpmPackage rec {
|
|||||||
# from the published tarball itself -- `npm install --package-lock-only
|
# from the published tarball itself -- `npm install --package-lock-only
|
||||||
# --ignore-scripts` inside the extracted 1.0.5 package -- so it locks exactly
|
# --ignore-scripts` inside the extracted 1.0.5 package -- so it locks exactly
|
||||||
# the dependency tree that shipped with this version.
|
# the dependency tree that shipped with this version.
|
||||||
npmDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
npmDepsHash = "sha256-oSlECdIf2ZP8ZZhOUChkcJAmUTj6TFTdeTJLY5RwLGo=";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
cp ${./package-lock.json} package-lock.json
|
cp ${./package-lock.json} package-lock.json
|
||||||
|
|||||||
Reference in new issue
Block a user