mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
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.
This commit is contained in:
parent
d474c87aff
commit
36eff4f431
@ -43,3 +43,12 @@ Disables using Meson’s `checkPhase`.
|
||||
### `dontUseMesonInstall` {#dontusemesoninstall}
|
||||
|
||||
Disables using Meson’s `installPhase`.
|
||||
|
||||
### `mesonInstallFlags` {#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.
|
||||
|
@ -55,6 +55,10 @@ mesonInstallPhase() {
|
||||
# shellcheck disable=SC2086
|
||||
local flagsArray=($mesonInstallFlags "${mesonInstallFlagsArray[@]}")
|
||||
|
||||
if [[ -n "$mesonInstallTags" ]]; then
|
||||
flagsArray+=("--tags" "${mesonInstallTags// /,}")
|
||||
fi
|
||||
|
||||
echoCmd 'install flags' "${flagsArray[@]}"
|
||||
meson install --no-rebuild "${flagsArray[@]}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user