From db5b86ef13026d7f034527005ab231ddc2b7d2c1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Apr 2012 19:15:34 -0400 Subject: * 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libstore/misc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstore/misc.cc') 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) { -- cgit 1.4.1