mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
* nix-prefetch-url: support caching. If the environment variable
NIX_DOWNLOAD_CACHE is set, then nix-prefetch-url will store the hash and timestamp of downloaded files in the directory $NIX_DOWNLOAD_CACHE. This allows it to figure out if the file is still in the Nix store.
This commit is contained in:
parent
ef240bc0d5
commit
f881f7a017
3 changed files with 58 additions and 13 deletions
|
@ -39,7 +39,7 @@ sub processURL {
|
|||
$url =~ s/\/$//;
|
||||
print "obtaining list of Nix archives at $url...\n";
|
||||
|
||||
system("@curl@ --fail --silent --show-error --location --max-redirs 20 " .
|
||||
system("@curl@ --fail -# --show-error --location --max-redirs 20 " .
|
||||
"'$url' > '$manifest'") == 0
|
||||
or die "curl failed: $?";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue