download-from-binary-cache: Only use the default cache for /nix/store

This commit is contained in:
Eelco Dolstra 2012-07-27 09:57:42 -04:00
parent 67c6f3eded
commit 7f8e805c8e

View file

@ -13,7 +13,9 @@ use strict;
Nix::Config::readConfig;
my @binaryCacheUrls = map { s/\/+$//; $_ } split(/ /,
($ENV{"NIX_BINARY_CACHES"} // $Nix::Config::config{"binary-caches"} // "http://nixos.org/binary-cache"));
($ENV{"NIX_BINARY_CACHES"}
// $Nix::Config::config{"binary-caches"}
// ($Nix::Config::storeDir eq "/nix/store" ? "http://nixos.org/binary-cache" : "")));
my $maxParallelRequests = int($Nix::Config::config{"binary-caches-parallel-connections"} // 150);
$maxParallelRequests = 1 if $maxParallelRequests < 1;