waf: make executable runnable (#388010)

authored by Dmitry Kalinkin and committed by GitHub 1da8df70 9f7eb433

+12 -5
+1 -1
doc/hooks/waf.section.md
··· 14 15 Location of the `waf` tool. It defaults to `./waf`, to honor software projects that include it directly inside their source trees. 16 17 - If `wafPath` doesn't exist, then `wafHook` will copy the `waf` provided from Nixpkgs to it. 18 19 #### `wafFlags` {#waf-flags} 20
··· 14 15 Location of the `waf` tool. It defaults to `./waf`, to honor software projects that include it directly inside their source trees. 16 17 + If the file pointed by `wafPath` doesn't exist, then `waf` provided by Nixpkgs will be used. 18 19 #### `wafFlags` {#waf-flags} 20
+10 -2
pkgs/by-name/wa/waf/package.nix
··· 4 , callPackage 5 , ensureNewerSourcesForZipFilesHook 6 , python3 7 # optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]` 8 , extraTools ? [] 9 }: ··· 22 nativeBuildInputs = [ 23 ensureNewerSourcesForZipFilesHook 24 python3 25 ]; 26 27 buildInputs = [ ··· 48 runHook preBuild 49 50 python waf-light build ${extraToolsList} 51 52 runHook postBuild 53 ''; ··· 55 installPhase = '' 56 runHook preInstall 57 58 - install -D waf $out/bin/waf 59 - 60 runHook postInstall 61 ''; 62
··· 4 , callPackage 5 , ensureNewerSourcesForZipFilesHook 6 , python3 7 + , makeWrapper 8 # optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]` 9 , extraTools ? [] 10 }: ··· 23 nativeBuildInputs = [ 24 ensureNewerSourcesForZipFilesHook 25 python3 26 + makeWrapper 27 ]; 28 29 buildInputs = [ ··· 50 runHook preBuild 51 52 python waf-light build ${extraToolsList} 53 + 54 + substituteInPlace waf \ 55 + --replace "w = test(i + '/lib/' + dirname)" \ 56 + "w = test('$out/${python3.sitePackages}')" 57 58 runHook postBuild 59 ''; ··· 61 installPhase = '' 62 runHook preInstall 63 64 + install -D waf "$out"/bin/waf 65 + wrapProgram "$out"/bin/waf --set PYTHONPATH "$out"/${python3.sitePackages} 66 + mkdir -p "$out"/${python3.sitePackages}/ 67 + cp -r waflib "$out"/${python3.sitePackages}/ 68 runHook postInstall 69 ''; 70
+1 -2
pkgs/by-name/wa/waf/setup-hook.sh
··· 4 runHook preConfigure 5 6 if ! [ -f "${wafPath:=./waf}" ]; then 7 - echo "copying waf to $wafPath..." 8 - cp @waf@/bin/waf "$wafPath" 9 fi 10 11 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
··· 4 runHook preConfigure 5 6 if ! [ -f "${wafPath:=./waf}" ]; then 7 + wafPath="@waf@/bin/waf" 8 fi 9 10 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then