mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
common-updater-scripts: Fix u-s-v updating npmDeps
`buildNpmDeps` pass `npmDepsHash` as `hash` to `fetchNpmDeps` so `npmDeps` does not contain `outputHashAlgo` attribute. This would cause the program fail as follows: $ update-source-version zx --ignore-same-version --source-key=npmDeps error: attribute 'outputHashAlgo' in selection path 'zx.npmDeps.drvAttrs.outputHashAlgo' not found update-source-version: error: Couldn't evaluate old source hash from 'zx.npmDeps'!
This commit is contained in:
parent
9fc19b0866
commit
69adf156ef
@ -134,7 +134,7 @@ if [[ -z "$nixFile" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
oldHashAlgo=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHashAlgo" | tr -d '"')
|
oldHashAlgo=$(nix-instantiate $systemArg --eval --strict -E "let pkgs = $importTree; in pkgs.$attr.$sourceKey.drvAttrs.outputHashAlgo or pkgs.$attr.$sourceKey.drvAttrs.outputHash" | tr -d '"' | sed "s/-.*//")
|
||||||
oldHash=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHash" | tr -d '"')
|
oldHash=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHash" | tr -d '"')
|
||||||
|
|
||||||
if [[ -z "$oldHashAlgo" || -z "$oldHash" ]]; then
|
if [[ -z "$oldHashAlgo" || -z "$oldHash" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user