about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-30T23·15-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-30T23·15-0400
commitdb5b86ef13026d7f034527005ab231ddc2b7d2c1 (patch)
tree590c3761e9d3cfae634a81fb80cc47659666941d /src/nix-worker/nix-worker.cc
parent59a26360c75f1cf5fe65fce5e3703df0b6645140 (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/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 4b0c9e3191..c69b9de506 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -513,8 +513,13 @@ static void performOp(unsigned int clientVersion,
             logType = (LogType) readInt(from);
             printBuildTrace = readInt(from) != 0;
         }
-        if (GET_PROTOCOL_MINOR(clientVersion) >= 6) {
+        if (GET_PROTOCOL_MINOR(clientVersion) >= 6)
             buildCores = readInt(from);
+        if (GET_PROTOCOL_MINOR(clientVersion) >= 10) {
+            int x = readInt(from);
+            Strings ss;
+            ss.push_back(x == 0 ? "false" : "true");
+            overrideSetting("build-use-substitutes", ss);
         }
         startWork();
         stopWork();