bazel_7: restrict USER hack to darwin

+3 -2
+3 -2
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
··· 307 '' 308 # Bazel needs a real home for self-extraction and internal cache 309 export HOME=$(mktemp -d) 310 - export USER=$(basename $HOME) 311 312 ${# Concurrent bazel invocations have the same workspace path. 313 - # On darwin, for some reason, it means they accessing and corrupting the same execroot. 314 # Having a different workspace path ensures we use different execroots. 315 lib.optionalString isDarwin '' 316 # cd $(mktemp --tmpdir=. -d) 317 '' 318 }
··· 307 '' 308 # Bazel needs a real home for self-extraction and internal cache 309 export HOME=$(mktemp -d) 310 311 ${# Concurrent bazel invocations have the same workspace path. 312 + # On darwin, for some reason, it means they access and corrupt the same execroot. 313 # Having a different workspace path ensures we use different execroots. 314 + # A different user seems to be enough for a different bazel cache root. 315 lib.optionalString isDarwin '' 316 + export USER=$(basename $HOME) 317 # cd $(mktemp --tmpdir=. -d) 318 '' 319 }