python3Packages.{pyobjc-core,pyobjc-framework-Cocoa}: 11.0 -> 11.1 (#421831)

This commit is contained in:
Samuel Ainsworth
2025-08-07 16:15:21 -04:00
committed by GitHub
2 changed files with 14 additions and 19 deletions
@@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "pyobjc-core";
version = "11.0";
version = "11.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ronaldoussoren";
repo = "pyobjc";
tag = "v${version}";
hash = "sha256-RhB0Ht6vyDxYwDGS+A9HZL9ySIjWlhdB4S+gHxvQQBg=";
hash = "sha256-2qPGJ/1hXf3k8AqVLr02fVIM9ziVG9NMrm3hN1de1Us=";
};
sourceRoot = "${src.name}/pyobjc-core";
@@ -31,18 +31,6 @@ buildPythonPackage rec {
darwin.DarwinTools # sw_vers
];
# See https://github.com/ronaldoussoren/pyobjc/pull/641. Unfortunately, we
# cannot just pull that diff with fetchpatch due to https://discourse.nixos.org/t/how-to-apply-patches-with-sourceroot/59727.
postPatch = ''
for file in Modules/objc/test/*.m; do
substituteInPlace "$file" --replace "[[clang::suppress]]" ""
done
substituteInPlace setup.py \
--replace-fail "-buildversion" "-buildVersion" \
--replace-fail "-productversion" "-productVersion"
'';
env.NIX_CFLAGS_COMPILE = toString [
"-I${darwin.libffi.dev}/include"
"-Wno-error=cast-function-type-mismatch"
@@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "pyobjc-framework-Cocoa";
version = "11.0";
version = "11.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ronaldoussoren";
repo = "pyobjc";
tag = "v${version}";
hash = "sha256-RhB0Ht6vyDxYwDGS+A9HZL9ySIjWlhdB4S+gHxvQQBg=";
hash = "sha256-2qPGJ/1hXf3k8AqVLr02fVIM9ziVG9NMrm3hN1de1Us=";
};
sourceRoot = "${src.name}/pyobjc-framework-Cocoa";
@@ -25,7 +25,6 @@ buildPythonPackage rec {
buildInputs = [
darwin.libffi
darwin.DarwinTools
];
nativeBuildInputs = [
@@ -37,7 +36,9 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace pyobjc_setup.py \
--replace-fail "-buildversion" "-buildVersion" \
--replace-fail "-productversion" "-productVersion"
--replace-fail "-productversion" "-productVersion" \
--replace-fail "/usr/bin/sw_vers" "sw_vers" \
--replace-fail "/usr/bin/xcrun" "xcrun"
'';
dependencies = [ pyobjc-core ];
@@ -47,7 +48,13 @@ buildPythonPackage rec {
"-Wno-error=unused-command-line-argument"
];
pythonImportsCheck = [ "Cocoa" ];
pythonImportsCheck = [
"Cocoa"
"CoreFoundation"
"Foundation"
"AppKit"
"PyObjCTools"
];
meta = with lib; {
description = "PyObjC wrappers for the Cocoa frameworks on macOS";