1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Debug when storePath changes

these rewrites should be transparent, but they are important to know
about when debugging
This commit is contained in:
Matthew Bauer 2020-06-12 15:32:52 -05:00
parent e3cb536f19
commit 88120442d2
2 changed files with 8 additions and 3 deletions

View file

@ -35,12 +35,13 @@ clearStore
other_store=file://$TEST_ROOT/other_store
hash=$(nix hash-file --type sha256 --base16 ./fetchurl.sh)
storePath=$(nix add-to-store --store $other_store ./fetchurl.sh)
outPath=$(nix-build -vvvvvv '<nix/fetchurl.nix>' --argstr url file:///no-such-dir/fetchurl.sh --argstr sha256 $hash --no-out-link --substituters $other_store)
storePath=$(nix --store $other_store add-to-store --flat ./fetchurl.sh)
outPath=$(nix-build '<nix/fetchurl.nix>' --argstr url file:///no-such-dir/fetchurl.sh --argstr sha256 $hash --no-out-link --substituters $other_store)
# Test hashed mirrors with an SRI hash.
nix-build '<nix/fetchurl.nix>' --argstr url file:///no-such-dir/fetchurl.sh --argstr hash $(nix to-sri --type sha512 $hash) \
nix-build '<nix/fetchurl.nix>' --argstr url file:///no-such-dir/fetchurl.sh --argstr hash $(nix to-sri --type sha256 $hash) \
--argstr name bla --no-out-link --substituters $other_store
# Test unpacking a NAR.