mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Make the hashes mirrors used by builtins.fetchurl configurable
In particular, this allows it to be disabled in our tests.
This commit is contained in:
parent
4ec6eb1fdf
commit
49304bae81
4 changed files with 42 additions and 8 deletions
|
@ -5,7 +5,7 @@ clearStore
|
|||
# Test fetching a flat file.
|
||||
hash=$(nix-hash --flat --type sha256 ./fetchurl.sh)
|
||||
|
||||
outPath=$(nix-build '<nix/fetchurl.nix>' --argstr url file://$(pwd)/fetchurl.sh --argstr sha256 $hash --no-out-link)
|
||||
outPath=$(nix-build '<nix/fetchurl.nix>' --argstr url file://$(pwd)/fetchurl.sh --argstr sha256 $hash --no-out-link --option hashed-mirrors '')
|
||||
|
||||
cmp $outPath fetchurl.sh
|
||||
|
||||
|
@ -14,7 +14,7 @@ clearStore
|
|||
|
||||
hash=$(nix hash-file --type sha512 --base64 ./fetchurl.sh)
|
||||
|
||||
outPath=$(nix-build '<nix/fetchurl.nix>' --argstr url file://$(pwd)/fetchurl.sh --argstr sha512 $hash --no-out-link)
|
||||
outPath=$(nix-build '<nix/fetchurl.nix>' --argstr url file://$(pwd)/fetchurl.sh --argstr sha512 $hash --no-out-link --option hashed-mirrors '')
|
||||
|
||||
cmp $outPath fetchurl.sh
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue