aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index 4ac0afe84..093499936 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) {