Skip to content

Commit

Permalink
bazel_7: restrict USER hack to darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
layus committed Dec 13, 2023
1 parent e0a1a73 commit 03f458b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ stdenv.mkDerivation rec {
''
# Bazel needs a real home for self-extraction and internal cache
export HOME=$(mktemp -d)
export USER=$(basename $HOME)
${# Concurrent bazel invocations have the same workspace path.
# On darwin, for some reason, it means they accessing and corrupting the same execroot.
# On darwin, for some reason, it means they access and corrupt the same execroot.
# Having a different workspace path ensures we use different execroots.
# A different user seems to be enough for a different bazel cache root.
lib.optionalString isDarwin ''
export USER=$(basename $HOME)
# cd $(mktemp --tmpdir=. -d)
''
}
Expand Down

0 comments on commit 03f458b

Please sign in to comment.