about summary refs log tree commit diff
path: root/corepkgs
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-08-14T19·35-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-14T20·32+0200
commit58204a3c39614297e71a21a7633ea8293e8304ee (patch)
treedfc0c2b350fe3aed12aeb39732a65a4800fcd10d /corepkgs
parent3fb7ae0586958a2404db41b8cf6ec4fe88f2f674 (diff)
corepkgs/nar.nix: Prefer local builds
nar.nix's builder depends on coreutils and nix itself being in $PATH.
Unfortunately, there's no good way to ensure that these packages exist
in the same place on the remote machine: The local machine may have nix
installed in /usr, and the remote machine in /usr/local, but the
generated nar.sh builder will refer to /usr and thus fail on the remote
machine. This ensures that nar.sh is run on the same machine that
instantiates it.

Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'corepkgs')
-rw-r--r--corepkgs/nar.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/corepkgs/nar.nix b/corepkgs/nar.nix
index 73009047ec..c3db19d0d3 100644
--- a/corepkgs/nar.nix
+++ b/corepkgs/nar.nix
@@ -43,4 +43,7 @@ derivation {
 
   # Don't build in a chroot because Nix's dependencies may not be there.
   __noChroot = true;
+
+  # Remote machines may not have ${nixBinDir} or ${coreutils} in the same prefixes
+  preferLocalBuild = true;
 }