diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index a308eb8aaa4c..32cec42160f8 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -4,7 +4,7 @@ , lib }: -args@{ name, bazelFlags ? [], bazelTarget, buildAttrs, fetchAttrs, ... }: +args@{ name, bazelFlags ? [], bazelBuildFlags ? [], bazelFetchFlags ? [], bazelTarget, buildAttrs, fetchAttrs, ... }: let fArgs = removeAttrs args [ "buildAttrs" "fetchAttrs" ]; @@ -12,11 +12,11 @@ let fFetchAttrs = fArgs // removeAttrs fetchAttrs [ "sha256" ]; in stdenv.mkDerivation (fBuildAttrs // { - inherit name bazelFlags bazelTarget; + inherit name bazelFlags bazelBuildFlags bazelFetchFlags bazelTarget; deps = stdenv.mkDerivation (fFetchAttrs // { name = "${name}-deps"; - inherit bazelFlags bazelTarget; + inherit bazelFlags bazelBuildFlags bazelFetchFlags bazelTarget; nativeBuildInputs = fFetchAttrs.nativeBuildInputs or [] ++ [ bazel ]; @@ -49,6 +49,7 @@ in stdenv.mkDerivation (fBuildAttrs // { fetch \ --loading_phase_threads=1 \ $bazelFlags \ + $bazelFetchFlags \ $bazelTarget runHook postBuild @@ -149,6 +150,7 @@ in stdenv.mkDerivation (fBuildAttrs // { "''${host_linkopts[@]}" \ '' + '' $bazelFlags \ + $bazelBuildFlags \ $bazelTarget runHook postBuild