diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-30T23·15-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-30T23·15-0400 |
commit | db5b86ef13026d7f034527005ab231ddc2b7d2c1 (patch) | |
tree | 590c3761e9d3cfae634a81fb80cc47659666941d /src/libstore/misc.cc | |
parent | 59a26360c75f1cf5fe65fce5e3703df0b6645140 (diff) |
* Add an option ‘build-use-substitutes’, which can be set to ‘false’
to disable use of substitutes; i.e., force building from source. Fixes Nix/221.
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r-- | src/libstore/misc.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 4ac0afe844b6..093499936349 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -1,6 +1,7 @@ #include "misc.hh" #include "store-api.hh" #include "local-store.hh" +#include "globals.hh" namespace nix { @@ -69,7 +70,8 @@ void queryMissing(StoreAPI & store, const PathSet & targets, bool mustBuild = false; foreach (DerivationOutputs::iterator, i, drv.outputs) - if (!store.isValidPath(i->second.path) && !store.hasSubstitutes(i->second.path)) + if (!store.isValidPath(i->second.path) && + !(queryBoolSetting("build-use-substitutes", true) && store.hasSubstitutes(i->second.path))) mustBuild = true; if (mustBuild) { |