From 387d6a931a1d28daff42c059c73d78f57aa46bce Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 4 Jun 2025 14:57:15 +0200 Subject: [PATCH] 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. --- .../python-modules/meson-python/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/meson-python/default.nix b/pkgs/development/python-modules/meson-python/default.nix index 512a020bd231..c3bbdc6276e3 100644 --- a/pkgs/development/python-modules/meson-python/default.nix +++ b/pkgs/development/python-modules/meson-python/default.nix @@ -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 ];