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,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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "waf-${version}";
|
name = "waf-${version}";
|
||||||
version = "2.0.15";
|
version = "2.0.15";
|
||||||
@ -24,7 +30,7 @@ stdenv.mkDerivation rec {
|
|||||||
python waf-light configure
|
python waf-light configure
|
||||||
'';
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
python waf-light build
|
python waf-light build${wafToolsArg}
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install waf $out
|
install waf $out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user