python3Packages.pyobjc-framework-Cocoa: init at 11.0

This commit is contained in:
Samuel Ainsworth
2025-02-03 13:44:09 -05:00
parent 8a4b47d7ca
commit a24313946d
2 changed files with 61 additions and 0 deletions
@@ -0,0 +1,59 @@
{
buildPythonPackage,
darwin,
fetchFromGitHub,
lib,
pyobjc-core,
setuptools,
}:
buildPythonPackage rec {
pname = "pyobjc-framework-Cocoa";
version = "11.0";
pyproject = true;
src = fetchFromGitHub {
owner = "ronaldoussoren";
repo = "pyobjc";
tag = "v${version}";
hash = "sha256-RhB0Ht6vyDxYwDGS+A9HZL9ySIjWlhdB4S+gHxvQQBg=";
};
sourceRoot = "source/pyobjc-framework-Cocoa";
build-system = [ setuptools ];
buildInputs = [
darwin.libffi
darwin.DarwinTools
];
nativeBuildInputs = [
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 = ''
substituteInPlace pyobjc_setup.py \
--replace-fail "-buildversion" "-buildVersion" \
--replace-fail "-productversion" "-productVersion"
'';
dependencies = [ pyobjc-core ];
env.NIX_CFLAGS_COMPILE = toString [
"-I${darwin.libffi.dev}/include"
"-Wno-error=unused-command-line-argument"
];
pythonImportsCheck = [ "Cocoa" ];
meta = with lib; {
description = "PyObjC wrappers for the Cocoa frameworks on macOS";
homepage = "https://github.com/ronaldoussoren/pyobjc";
license = licenses.mit;
platforms = platforms.darwin;
maintainers = with maintainers; [ samuela ];
};
}
+2
View File
@@ -12319,6 +12319,8 @@ self: super: with self; {
pyobjc-core = callPackage ../development/python-modules/pyobjc-core { };
pyobjc-framework-Cocoa = callPackage ../development/python-modules/pyobjc-framework-Cocoa { };
pyocd = callPackage ../development/python-modules/pyocd { };
pyocd-pemicro = callPackage ../development/python-modules/pyocd-pemicro { };