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

Split 'nix store add-to-store' into 'add-path' and 'add-file'

This makes it consistent with 'nix hash <path|file>'.
This commit is contained in:
Eelco Dolstra 2020-12-04 00:58:09 +01:00
parent 8df58eae4c
commit f337aa7099
4 changed files with 77 additions and 25 deletions

View file

@ -36,7 +36,7 @@ other_store=file://$TEST_ROOT/other_store?store=/fnord/store
hash=$(nix hash file --type sha256 --base16 ./fetchurl.sh)
storePath=$(nix --store $other_store store add-path --flat ./fetchurl.sh)
storePath=$(nix --store $other_store store add-file ./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)