mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
buildBazelPackage: add flags for build and fetch
They sometimes take separate flags.
This commit is contained in:
parent
019c13616b
commit
e458a34012
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user