Hi again
I am trying to override a package version with the following snippet, and have added lib.fakeHash as the initial error kindly suggested.
Unfortunately it seems to loop with the same error and the suggested fix does not appear to work.
Am I missing something? (apart from npm deps being a challenge already :))
modifications = final: prev: {
netbird-dashboard = prev.netbird-dashboard.overrideAttrs (_old: rec {
pname = "netbird-dashboard";
version = "2.5.0";
src = prev.fetchFromGitHub {
owner = "netbirdio";
repo = "dashboard";
rev = "v${version}";
hash = "sha256-PissALQ/3gARnm2hiURABFqF2OKkFITMKf2Rww56hEM=";
};
npmDepsHash = lib.fakeHash;
});
};
error: builder for '/nix/store/x9h0n8k0gg6cl9p0xlk5b7n8c3jch00l-netbird-dashboard-2.5.0.drv' failed with exit code 1;
last 25 log lines:
> > }
> > },
> 6679,6690d6346
> < }
> < },
> < "node_modules/react-virtuoso": {
> < "version": "4.10.0",
> < "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.10.0.tgz",
> < "integrity": "sha512-CyxU5TYMH4bw2cybH0bNqN/yIg2q2Vd0kbs92tQc5ResZALAIzIVJY4JL6BHgJFQjwrLhCYrFwKq0p+lvBgA0w==",
> < "engines": {
> < "node": ">=10"
> < },
> < "peerDependencies": {
> < "react": ">=16 || >=17 || >= 18",
> < "react-dom": ">=16 || >=17 || >= 18"
>
> ERROR: npmDepsHash is out of date
>
> The package-lock.json in src is not the same as the in /nix/store/sqrf7y8p3q75d1gp2c3m0qr48h6r9fr8-netbird-dashboard-2.3.0-npm-deps.
>
> To fix the issue:
> 1. Use `lib.fakeHash` as the npmDepsHash value
> 2. Build the derivation and wait for it to fail with a hash mismatch
> 3. Copy the 'got: sha256-' value back into the npmDepsHash field
>
For full logs, run 'nix log /nix/store/x9h0n8k0gg6cl9p0xlk5b7n8c3jch00l-netbird-dashboard-2.5.0.drv'.
ERROR: npmDepsHash is out of date
The package-lock.json in src is not the same as the in /nix/store/sqrf7y8p3q75d1gp2c3m0qr48h6r9fr8-netbird-dashboard-2.3.0-npm-deps.
To fix the issue:
1. Use `lib.fakeHash` as the npmDepsHash value
2. Build the derivation and wait for it to fail with a hash mismatch
3. Copy the 'got: sha256-' value back into the npmDepsHash field