summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-19 02:25:47 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-19 02:25:47 +0200
commitee3c5d7916b48d0c3b1cc08044e27209c14acfdc (patch)
treeeb6d72a7f7abf285ff13d9cb732a71a7c39f18e5
parent2e77bd70faee34cb2518529318a54b39f2d9143e (diff)
downloadguix-ee3c5d7916b48d0c3b1cc08044e27209c14acfdc.tar.gz
Revert old useBuildHook behaviour
-rw-r--r--src/libstore/build.cc2
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/nix-daemon/nix-daemon.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d594706032..4376a8322c 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1505,7 +1505,7 @@ void DerivationGoal::buildDone()
 
 HookReply DerivationGoal::tryBuildHook()
 {
-    if (!settings.useBuildHook) return rpDecline;
+    if (!settings.useBuildHook || getEnv("NIX_BUILD_HOOK") == "") return rpDecline;
 
     if (!worker.hook)
         worker.hook = std::shared_ptr<HookInstance>(new HookInstance);
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 2bfebb77a1..28982ec150 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -39,7 +39,7 @@ Settings::Settings()
     thisSystem = SYSTEM;
     maxSilentTime = 0;
     buildTimeout = 0;
-    useBuildHook = getEnv("NIX_BUILD_HOOK") != "";
+    useBuildHook = true;
     printBuildTrace = false;
     reservedSize = 1024 * 1024;
     fsyncMetadata = true;
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index dde501d309..f2141ee536 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -552,7 +552,7 @@ static void performOp(bool trusted, unsigned int clientVersion,
         settings.set("build-max-jobs", int2String(readInt(from)));
         settings.set("build-max-silent-time", int2String(readInt(from)));
         if (GET_PROTOCOL_MINOR(clientVersion) >= 2)
-            if (readInt(from) != 0) settings.useBuildHook = true;
+            settings.useBuildHook = readInt(from) != 0;
         if (GET_PROTOCOL_MINOR(clientVersion) >= 4) {
             settings.buildVerbosity = (Verbosity) readInt(from);
             logType = (LogType) readInt(from);