python3Packages.meson-python: ignore target version on darwin during tests

For darwin we set a minimal deployment target at 11.3 currently, which
meson-python correctly detects, only to the compare it to the running
platform version, which is currently 15.5.

We concluded in the upstream issue, that the tests likely should not
respect this environment variable, so we now unset it on darwin.
This commit is contained in:
Martin Weinelt
2025-06-04 15:13:23 +02:00
parent 9cfe4191e5
commit 387d6a931a
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
pythonOlder,
@@ -82,6 +83,16 @@ buildPythonPackage rec {
"test_user_args"
"test_vendored_meson"
];
# meson-python respectes MACOSX_DEPLOYMENT_TARGET, but compares it with the
# actual platform version during tests, which mismatches.
# https://github.com/mesonbuild/meson-python/issues/760
preCheck =
if stdenv.hostPlatform.isDarwin then
''
unset MACOSX_DEPLOYMENT_TARGET
''
else
null;
setupHooks = [ ./add-build-flags.sh ];