From e458a340128834024d3445af5e40fecfbbfea086 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 18 Jul 2019 13:49:00 +0200 Subject: [PATCH] buildBazelPackage: add flags for build and fetch They sometimes take separate flags. --- pkgs/build-support/build-bazel-package/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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