1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +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:
Eelco Dolstra 2012-11-06 13:44:59 +01:00
parent df27db712d
commit 620e92e880
2 changed files with 14 additions and 0 deletions

View file

@ -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);