diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-07-28 15:52:36 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2018-07-28 16:03:17 +0200 |
commit | 77a9745d7ac675883fdbe8c448b5b94904cd2d2a (patch) | |
tree | 93ce4689a1fa3962aa89795a99c021a7fc180fd5 /pkgs/tools | |
parent | 13c693ed95d13297be4a53e2877a7b44f49eb619 (diff) | |
download | nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar.gz nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar.bz2 nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar.lz nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar.xz nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.tar.zst nixlib-77a9745d7ac675883fdbe8c448b5b94904cd2d2a.zip |
nix: don't use /tmp for the tests on darwin
Unlike on linux these are not namespaced per user so this will cause build failures if /tmp/nix-test was not removed by a previous build if the nixbld user id doesn't match by accident. Nix already creates a unique tempdir for builds so we can use that instead. Fixes #44172
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 07c130f1cb38..5c8341941ed6 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -71,7 +71,9 @@ let doInstallCheck = true; # not cross # socket path becomes too long otherwise - preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp"; + preInstallCheck = lib.optional stdenv.isDarwin '' + export TMPDIR=$NIX_BUILD_TOP + ''; separateDebugInfo = stdenv.isLinux; |