mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
787af710c6
It's not uncommon for packages to modify mesonFlags/mesonFlagsArray in
e.g. preConfigure. Since the hook was previously run immediately,
these changes wouldn't have been picked up. To fix this, run the hook
after the configure phase, where we know the list of meson flags will
have been finalized.
Fixes: 70d182be3f
("python3.pkgs.meson-python: populate python build flags with $mesonFlags")
11 lines
384 B
Bash
11 lines
384 B
Bash
mesonPythonBuildFlagsHook() {
|
|
# Add all of mesonFlags to -Csetup-args for pypa builds
|
|
for f in $mesonFlags; do
|
|
pypaBuildFlags+=" -Csetup-args=$f"
|
|
# This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html
|
|
pipBuildFlags+=" --config-settings=setup-args=$f"
|
|
done
|
|
}
|
|
|
|
postConfigureHooks+=(mesonPythonBuildFlagsHook)
|