nixpkgs/doc/hooks/meson.section.md
Julian Stecklina 36eff4f431 meson: introduce mesonInstallTags
Projects building with meson are currently installTargets. Map these
to install tags, which are roughly equivalent. This allows projects to
selectively install components.
2023-10-23 01:46:24 +02:00

1.8 KiB
Raw Blame History

Meson

Overrides the configure, check, and install phases to run meson setup, meson test, and meson install.

Meson is a meta-build system so you will need a secondary build system to run the generated build files in build phase. In Nixpkgs context, you will want to accompany Meson with ninja, which provides a setup hook registering a ninja-based build phase.

By default, enableParallelBuilding is enabled as Meson supports parallel building almost everywhere.

Variables controlling Meson

mesonFlags

Controls the flags passed to meson setup.

mesonCheckFlags

Controls the flags passed to meson test.

mesonInstallFlags

Controls the flags passed to meson install.

mesonBuildType

Which --buildtype to pass to meson setup. We default to plain.

mesonAutoFeatures

What value to set -Dauto_features= to. We default to enabled.

mesonWrapMode

What value to set -Dwrap_mode= to. We default to nodownload as we disallow network access.

dontUseMesonConfigure

Disables using Mesons configurePhase.

dontUseMesonCheck

Disables using Mesons checkPhase.

dontUseMesonInstall

Disables using Mesons installPhase.

mesonInstallFlags

Controls the flags passed to meson install.

mesonInstallTags (#mesoninstalltags)

Tags specified here will be passed to Meson as via --tags during installation and controls which components will be installed.