bazel_7: restrict USER hack to darwin

+3 -2
+3 -2
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
··· 307 307 '' 308 308 # Bazel needs a real home for self-extraction and internal cache 309 309 export HOME=$(mktemp -d) 310 - export USER=$(basename $HOME) 311 310 312 311 ${# Concurrent bazel invocations have the same workspace path. 313 - # On darwin, for some reason, it means they accessing and corrupting the same execroot. 312 + # On darwin, for some reason, it means they access and corrupt the same execroot. 314 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 315 lib.optionalString isDarwin '' 316 + export USER=$(basename $HOME) 316 317 # cd $(mktemp --tmpdir=. -d) 317 318 '' 318 319 }