From 8070d9c8beec8a9d8abab150a63ae1885e75222f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 8 Jun 2025 21:28:34 +0200 Subject: [PATCH] python3Packages.meson-python: replace darwin workaround with upstream patch Benefit is that this will break on the version bump and we'll remember to remove it. --- .../python-modules/meson-python/default.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/meson-python/default.nix b/pkgs/development/python-modules/meson-python/default.nix index 917cdd88e221..6364fc2bf8ce 100644 --- a/pkgs/development/python-modules/meson-python/default.nix +++ b/pkgs/development/python-modules/meson-python/default.nix @@ -1,8 +1,8 @@ { lib, - stdenv, buildPythonPackage, fetchPypi, + fetchpatch, pythonOlder, # build-system, dependencies @@ -29,6 +29,14 @@ buildPythonPackage rec { hash = "sha256-xWqZ7J32aaQGYv5GlgMhr25LFBBsFNsihwnBYo4jhI0="; }; + patches = [ + (fetchpatch { + # TODO: Remove in 0.19.0 + url = "https://github.com/mesonbuild/meson-python/commit/1e69e7a23f2b24d688dc4220e93de6f0e2bcf9d2.patch"; + hash = "sha256-FC2ll/OrLV1R0CDB6UkrknVASJQ7rSU+sApdAk75x44="; + }) + ]; + build-system = [ meson ninja @@ -48,17 +56,6 @@ buildPythonPackage rec { pytest-mock ]; - # 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 ]; meta = {