summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPascal Wittmann <mail@pascal-wittmann.de>2018-07-15 22:22:47 +0200
committerGitHub <noreply@github.com>2018-07-15 22:22:47 +0200
commit4a35e7ef1dacfd0b8bff2e14e345b39055683c2e (patch)
treed501946ac96e15940fdcf9d9164b65a97abea2c5 /pkgs
parent5b1f6b59596fd48ec0b366d8ad6f9a27bdd8449c (diff)
parent2a7aa43c164cfe53d04a448b37447d3a4bbe9cc0 (diff)
downloadnixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar.gz
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar.bz2
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar.lz
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar.xz
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.tar.zst
nixlib-4a35e7ef1dacfd0b8bff2e14e345b39055683c2e.zip
Merge pull request #43503 from volth/bazel-private-tmp
bazel: use per-user tmp directory to avoid conflict with other builders
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/build-managers/bazel/0.4.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix4
2 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/0.4.nix b/pkgs/development/tools/build-managers/bazel/0.4.nix
index 7fa39ef21627..69f467f577c8 100644
--- a/pkgs/development/tools/build-managers/bazel/0.4.nix
+++ b/pkgs/development/tools/build-managers/bazel/0.4.nix
@@ -65,8 +65,9 @@ stdenv.mkDerivation rec {
   ];
 
   buildPhase = ''
+    export TMPDIR=/tmp/.bazel-$UID
     ./compile.sh
-    ./output/bazel --output_user_root=/tmp/.bazel build //scripts:bash_completion \
+    ./output/bazel --output_user_root=$TMPDIR/.bazel build //scripts:bash_completion \
       --spawn_strategy=standalone \
       --genrule_strategy=standalone
     cp bazel-bin/scripts/bazel-complete.bash output/
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index 28214e94c7aa..0441ba0c665d 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -96,9 +96,9 @@ stdenv.mkDerivation rec {
   # Change this to $(mktemp -d) as soon as we figure out why.
 
   buildPhase = ''
-    export TMPDIR=/tmp
+    export TMPDIR=/tmp/.bazel-$UID
     ./compile.sh
-    ./output/bazel --output_user_root=/tmp/.bazel build //scripts:bash_completion \
+    ./output/bazel --output_user_root=$TMPDIR/.bazel build //scripts:bash_completion \
       --spawn_strategy=standalone \
       --genrule_strategy=standalone
     cp bazel-bin/scripts/bazel-complete.bash output/