lol

python3.pkgs.meson-python: run hook in postConfigure

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: 70d182be3fd4 ("python3.pkgs.meson-python: populate python build flags with $mesonFlags")

+10 -6
+10 -6
pkgs/development/python-modules/meson-python/add-build-flags.sh
··· 1 - # Add all of mesonFlags to -Csetup-args for pypa builds 2 - for f in $mesonFlags; do 3 - pypaBuildFlags+=" -Csetup-args=$f" 4 - # This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html 5 - pipBuildFlags+=" --config-settings=setup-args=$f" 6 - done 1 + mesonPythonBuildFlagsHook() { 2 + # Add all of mesonFlags to -Csetup-args for pypa builds 3 + for f in $mesonFlags; do 4 + pypaBuildFlags+=" -Csetup-args=$f" 5 + # This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html 6 + pipBuildFlags+=" --config-settings=setup-args=$f" 7 + done 8 + } 9 + 10 + postConfigureHooks+=(mesonPythonBuildFlagsHook)