waf: Added support for optional extra tools (#63042)
The list of tools `withTools` are included as extra tools when building waf. Example: mywaf = callPackage ../development/tools/build-managers/waf { python = python3; withTools = [ "doxygen" ]; };
This commit is contained in:
parent
10a25e9b52
commit
2b51328002
1 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,11 @@
|
|||
{ stdenv, fetchFromGitLab, fetchpatch, python, ensureNewerSourcesForZipFilesHook }:
|
||||
|
||||
{ stdenv, fetchFromGitLab, fetchpatch, python, ensureNewerSourcesForZipFilesHook
|
||||
# optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]`
|
||||
, withTools ? null
|
||||
}:
|
||||
let
|
||||
wafToolsArg = with stdenv.lib.strings;
|
||||
optionalString (!isNull withTools) " --tools=\"${concatStringsSep "," withTools}\"";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "waf-${version}";
|
||||
version = "2.0.15";
|
||||
|
@ -24,7 +30,7 @@ stdenv.mkDerivation rec {
|
|||
python waf-light configure
|
||||
'';
|
||||
buildPhase = ''
|
||||
python waf-light build
|
||||
python waf-light build${wafToolsArg}
|
||||
'';
|
||||
installPhase = ''
|
||||
install waf $out
|
||||
|
|
Loading…
Reference in a new issue