3 [Meson](https://mesonbuild.com/) is an open source meta build system meant to be
4 fast and user-friendly.
6 In Nixpkgs, meson comes with a setup hook that overrides the configure, check,
9 Being a meta build system, meson needs an accompanying backend. In the context
10 of Nixpkgs, the typical companion backend is [Ninja](#ninja), that provides a
11 setup hook registering ninja-based build and install phases.
13 ## Variables controlling Meson {#meson-variables-controlling}
15 ### Meson Exclusive Variables {#meson-exclusive-variables}
17 #### `mesonFlags` {#meson-flags}
19 Controls the flags passed to `meson setup` during configure phase.
21 #### `mesonWrapMode` {#meson-wrap-mode}
23 Which value is passed as
24 [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options)
25 to. In Nixpkgs the default value is `nodownload`, so that no subproject will be
26 downloaded (since network access is already disabled during deployment in
29 Note: Meson allows pre-population of subprojects that would otherwise be
32 #### `mesonBuildType` {#meson-build-type}
34 Which value is passed as
35 [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to
36 `meson setup` during configure phase. In Nixpkgs the default value is `plain`.
38 #### `mesonAutoFeatures` {#meson-auto-features}
40 Which value is passed as
41 [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options)
42 to `meson setup` during configure phase. In Nixpkgs the default value is
43 `enabled`, meaning that every feature declared as "auto" by the meson scripts
46 #### `mesonCheckFlags` {#meson-check-flags}
48 Controls the flags passed to `meson test` during check phase.
50 #### `mesonInstallFlags` {#meson-install-flags}
52 Controls the flags passed to `meson install` during install phase.
54 #### `mesonInstallTags` {#meson-install-tags}
56 A list of installation tags passed to Meson's commandline option
57 [`--tags`](https://mesonbuild.com/Installing.html#installation-tags) during
60 Note: `mesonInstallTags` should be a list of strings, that will be converted to
61 a comma-separated string that is recognized to `--tags`.
62 Example: `mesonInstallTags = [ "emulator" "assembler" ];` will be converted to
63 `--tags emulator,assembler`.
65 #### `dontUseMesonConfigure` {#dont-use-meson-configure}
67 When set to true, don't use the predefined `mesonConfigurePhase`.
69 #### `dontUseMesonCheck` {#dont-use-meson-check}
71 When set to true, don't use the predefined `mesonCheckPhase`.
73 #### `dontUseMesonInstall` {#dont-use-meson-install}
75 When set to true, don't use the predefined `mesonInstallPhase`.
77 ### Honored variables {#meson-honored-variables}
79 The following variables commonly used by `stdenv.mkDerivation` are honored by
83 - `enableParallelBuilding`