2023-09-10 12:56:09 +01:00
# wafHook {#waf-hook}
2022-10-13 14:36:04 +01:00
2023-07-17 03:24:31 +01:00
[Waf ](https://waf.io ) is a Python-based software building system.
2023-09-10 12:56:09 +01:00
In Nixpkgs, `wafHook` overrides the default configure, build, and install phases.
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
## Variables controlling wafHook {#waf-hook-variables-controlling}
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
### `wafHook` Exclusive Variables {#waf-hook-exclusive-variables}
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
The variables below are exclusive of `wafHook` .
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
#### `wafPath` {#waf-path}
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
Location of the `waf` tool. It defaults to `./waf` , to honor software projects that include it directly inside their source trees.
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
If `wafPath` doesn't exist, then `wafHook` will copy the `waf` provided from Nixpkgs to it.
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
#### `wafFlags` {#waf-flags}
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
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.
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
#### `dontUseWafConfigure` {#dont-use-waf-configure}
2023-07-17 03:24:31 +01:00
When set to true, don't use the predefined `wafConfigurePhase` .
2023-09-10 12:56:09 +01:00
#### `dontUseWafBuild` {#dont-use-waf-build}
2023-07-17 03:24:31 +01:00
When set to true, don't use the predefined `wafBuildPhase` .
2023-09-10 12:56:09 +01:00
#### `dontUseWafInstall` {#dont-use-waf-install}
2023-07-17 03:24:31 +01:00
When set to true, don't use the predefined `wafInstallPhase` .
2023-09-10 12:56:09 +01:00
### Similar variables {#waf-hook-similar-variables}
The following variables are similar to their `stdenv.mkDerivation` counterparts.
| `wafHook` Variable | `stdenv.mkDerivation` Counterpart |
|-----------------------|-----------------------------------|
| `wafConfigureFlags` | `configureFlags` |
| `wafConfigureTargets` | `configureTargets` |
| `wafBuildFlags` | `buildFlags` |
| `wafBuildTargets` | `buildTargets` |
| `wafInstallFlags` | `installFlags` |
| `wafInstallTargets` | `installTargets` |
### Honored variables {#waf-hook-honored-variables}
2023-07-17 03:24:31 +01:00
2023-09-10 12:56:09 +01:00
The following variables commonly used by `stdenv.mkDerivation` are honored by `wafHook` .
2023-07-17 03:24:31 +01:00
- `prefixKey`
- `enableParallelBuilding`
- `enableParallelInstalling`