2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, python, ensureNewerSourcesForZipFilesHook
|
2020-04-24 23:36:52 +00:00
|
|
|
# optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]`
|
|
|
|
, withTools ? null
|
|
|
|
}:
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
wafToolsArg = with lib.strings;
|
2020-04-24 23:36:52 +00:00
|
|
|
optionalString (!isNull withTools) " --tools=\"${concatStringsSep "," withTools}\"";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "waf";
|
|
|
|
version = "2.0.20";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ita1024";
|
|
|
|
repo = "waf";
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "1xbd1lmchq9pdrplkr2db28xqafyw753qbhnrfn8pxdg3inxxqvq";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python ensureNewerSourcesForZipFilesHook ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
python waf-light configure
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
python waf-light build${wafToolsArg}
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
install -D waf $out/bin/waf
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Meta build system";
|
|
|
|
homepage = "https://waf.io";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ vrthra ];
|
|
|
|
};
|
|
|
|
}
|