mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
download-using-manifests: Don't use nix-prefetch-url
Instead call curl directly and pipe it into ‘nix-store --restore’. This saves I/O and prevents creating garbage in the Nix store.
This commit is contained in:
parent
b4ea83249b
commit
3a8f841612
2 changed files with 29 additions and 41 deletions
|
@ -428,7 +428,7 @@ sub downloadBinary {
|
|||
}
|
||||
my $url = "$binaryCacheUrl/$info->{url}"; # FIXME: handle non-relative URLs
|
||||
print STDERR "\n*** Downloading ‘$url’ into ‘$storePath’...\n";
|
||||
if (system("$Nix::Config::curl --fail --location '$url' | $decompressor | $Nix::Config::binDir/nix-store --restore $storePath") != 0) {
|
||||
if (system("$Nix::Config::curl --fail --location --insecure '$url' | $decompressor | $Nix::Config::binDir/nix-store --restore $storePath") != 0) {
|
||||
die "download of `$info->{url}' failed" . ($! ? ": $!" : "") . "\n" unless $? == 0;
|
||||
next;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue