nixpkgs/pkgs/development/tools/build-managers/waf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitLab, python3, ensureNewerSourcesForZipFilesHook
# optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]`
, withTools ? null
}:
let
wafToolsArg = with lib.strings;
optionalString (withTools != null) " --tools=\"${concatStringsSep "," withTools}\"";
in
2016-02-10 19:34:05 +00:00
stdenv.mkDerivation rec {
pname = "waf";
2023-01-06 13:23:15 +00:00
version = "2.0.25";
2016-02-10 19:34:05 +00:00
src = fetchFromGitLab {
owner = "ita1024";
repo = "waf";
rev = "${pname}-${version}";
2023-01-06 13:23:15 +00:00
sha256 = "sha256-wqZEAfGRHhcd7Xm2pQ0FTjZGfuPafRrZAUdpc7ACoEA=";
2016-02-10 19:34:05 +00:00
};
nativeBuildInputs = [ python3 ensureNewerSourcesForZipFilesHook ];
# waf bin has #!/usr/bin/env python
buildInputs = [ python3 ];
2016-02-10 19:34:05 +00:00
configurePhase = ''
python waf-light configure
'';
buildPhase = ''
python waf-light build${wafToolsArg}
2016-02-10 19:34:05 +00:00
'';
installPhase = ''
install -D waf $out/bin/waf
2016-02-10 19:34:05 +00:00
'';
strictDeps = true;
meta = with lib; {
2016-02-10 19:34:05 +00:00
description = "Meta build system";
homepage = "https://waf.io";
2016-06-27 04:56:50 +00:00
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ vrthra ];
2016-02-10 19:34:05 +00:00
};
}