From 58204a3c39614297e71a21a7633ea8293e8304ee Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 14 Aug 2013 15:35:13 -0400 Subject: [PATCH] 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 --- corepkgs/nar.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corepkgs/nar.nix b/corepkgs/nar.nix index 73009047e..c3db19d0d 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; }