Handle /tmp being a symlink

Hopefully fixes Darwin sandbox regression introduced in
8063fc497a.
This commit is contained in:
Eelco Dolstra 2015-12-22 17:16:17 +01:00
parent 68fd01f42a
commit 52120123a5

View file

@ -1765,7 +1765,7 @@ void DerivationGoal::startBuilder()
/* In a sandbox, for determinism, always use the same temporary
directory. */
tmpDirInSandbox = useChroot ? "/tmp/nix-build-" + drvName + "-0" : tmpDir;
tmpDirInSandbox = useChroot ? canonPath("/tmp", true) + "/nix-build-" + drvName + "-0" : tmpDir;
/* Add all bindings specified in the derivation via the
environments, except those listed in the passAsFile