wbg: move to pkgs/by-name
[NixPkgs.git] / doc / hooks / waf.section.md
blobfa027d87a94d71bb63a1d7cbdc2107e00e36e700
1 # wafHook {#waf-hook}
3 [Waf](https://waf.io) is a Python-based software building system.
5 In Nixpkgs, `wafHook` overrides the default configure, build, and install phases.
7 ## Variables controlling wafHook {#waf-hook-variables-controlling}
9 ### `wafHook` Exclusive Variables {#waf-hook-exclusive-variables}
11 The variables below are exclusive of `wafHook`.
13 #### `wafPath` {#waf-path}
15 Location of the `waf` tool. It defaults to `./waf`, to honor software projects that include it directly inside their source trees.
17 If `wafPath` doesn't exist, then `wafHook` will copy the `waf` provided from Nixpkgs to it.
19 #### `wafFlags` {#waf-flags}
21 Controls the flags passed to waf tool during build and install phases. For settings specific to build or install phases, use `wafBuildFlags` or `wafInstallFlags` respectively.
23 #### `dontAddWafCrossFlags` {#dont-add-waf-cross-flags}
25 When set to `true`, don't add cross compilation flags during configure phase.
27 #### `dontUseWafConfigure` {#dont-use-waf-configure}
29 When set to true, don't use the predefined `wafConfigurePhase`.
31 #### `dontUseWafBuild` {#dont-use-waf-build}
33 When set to true, don't use the predefined `wafBuildPhase`.
35 #### `dontUseWafInstall` {#dont-use-waf-install}
37 When set to true, don't use the predefined `wafInstallPhase`.
39 ### Similar variables {#waf-hook-similar-variables}
41 The following variables are similar to their `stdenv.mkDerivation` counterparts.
43 | `wafHook` Variable    | `stdenv.mkDerivation` Counterpart |
44 |-----------------------|-----------------------------------|
45 | `wafConfigureFlags`   | `configureFlags`                  |
46 | `wafConfigureTargets` | `configureTargets`                |
47 | `wafBuildFlags`       | `buildFlags`                      |
48 | `wafBuildTargets`     | `buildTargets`                    |
49 | `wafInstallFlags`     | `installFlags`                    |
50 | `wafInstallTargets`   | `installTargets`                  |
52 ### Honored variables {#waf-hook-honored-variables}
54 The following variables commonly used by `stdenv.mkDerivation` are honored by `wafHook`.
56 - `prefixKey`
57 - `enableParallelBuilding`
58 - `enableParallelInstalling`