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.
This commit is contained in:
Martin Weinelt 2025-06-08 21:28:34 +02:00
parent d8b19009b6
commit 8070d9c8be
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,8 +1,8 @@
{ {
lib, lib,
stdenv,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
fetchpatch,
pythonOlder, pythonOlder,
# build-system, dependencies # build-system, dependencies
@ -29,6 +29,14 @@ buildPythonPackage rec {
hash = "sha256-xWqZ7J32aaQGYv5GlgMhr25LFBBsFNsihwnBYo4jhI0="; 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 = [ build-system = [
meson meson
ninja ninja
@ -48,17 +56,6 @@ buildPythonPackage rec {
pytest-mock 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 ]; setupHooks = [ ./add-build-flags.sh ];
meta = { meta = {