mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Add an option ‘use-binary-caches’
This allows disabling the use of binary caches, e.g. $ nix-build ... --option use-binary-caches false Note that $ nix-build ... --option binary-caches '' does not disable all binary caches, since the caches defined by channels will still be used.
This commit is contained in:
parent
df27db712d
commit
620e92e880
2 changed files with 14 additions and 0 deletions
|
@ -177,6 +177,10 @@ sub getAvailableCaches {
|
|||
return if $gotCaches;
|
||||
$gotCaches = 1;
|
||||
|
||||
return if
|
||||
($Nix::Config::config{"use-binary-caches"} // "true") eq "false" ||
|
||||
($Nix::Config::config{"untrusted-use-binary-caches"} // "true") eq "false";
|
||||
|
||||
sub strToList {
|
||||
my ($s) = @_;
|
||||
return map { s/\/+$//; $_ } split(/ /, $s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue