From 2a7aa43c164cfe53d04a448b37447d3a4bbe9cc0 Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 13 Jul 2018 23:10:37 +0000 Subject: [PATCH] bazel: use per-user tmp directory to avoid conflict with other builders --- pkgs/development/tools/build-managers/bazel/0.4.nix | 3 ++- pkgs/development/tools/build-managers/bazel/default.nix | 4 ++-- 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 112cd840a9f5..48b68e9cb006 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -483,9 +483,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 \ --crosstool_top=//nix:nix --host_crosstool_top=//nix:nix