about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 0ed96bd23976..d8b629af63d0 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -3,6 +3,7 @@
 #include "remote-store.hh"
 #include "worker-protocol.hh"
 #include "archive.hh"
+#include "globals.hh"
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -27,7 +28,9 @@ RemoteStore::RemoteStore()
 
     
     /* Start the worker. */
-    string worker = "nix-worker";
+    Path worker = getEnv("NIX_WORKER");
+    if (worker == "")
+        worker = nixBinDir + "/nix-worker";
 
     child = fork();