mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
build-bazel-package: prefix bazel with the USER variable
Bazel computes the default value of output_user_root before parsing the
flag[0]. The computation of the default value involves getting the $USER
from the environment. I don't have that variable when building with
sandbox enabled.
[0]: 9323c57607/src/main/cpp/startup_options.cc (L123-L124)
This commit is contained in:
parent
e3654421d3
commit
18aa9b0b65
@ -25,7 +25,13 @@ in stdenv.mkDerivation (fBuildAttrs // {
|
|||||||
buildPhase = fFetchAttrs.buildPhase or ''
|
buildPhase = fFetchAttrs.buildPhase or ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
bazel --output_base="$bazelOut" --output_user_root="$bazelUserRoot" fetch $bazelFlags $bazelTarget
|
# Bazel computes the default value of output_user_root before parsing the
|
||||||
|
# flag. The computation of the default value involves getting the $USER
|
||||||
|
# from the environment. I don't have that variable when building with
|
||||||
|
# sandbox enabled. Code here
|
||||||
|
# https://github.com/bazelbuild/bazel/blob/9323c57607d37f9c949b60e293b573584906da46/src/main/cpp/startup_options.cc#L123-L124
|
||||||
|
#
|
||||||
|
USER=homeless-shelter bazel --output_base="$bazelOut" --output_user_root="$bazelUserRoot" fetch $bazelFlags $bazelTarget
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user