python3Packages.pyobjc-framework-libdispatch: init at 11.1

This commit is contained in:
Pavol Rusnak
2025-12-08 20:35:42 +01:00
parent 5d07912ccc
commit 90fd100ec4
2 changed files with 71 additions and 0 deletions
@@ -0,0 +1,67 @@
{
buildPythonPackage,
darwin,
fetchFromGitHub,
lib,
pyobjc-core,
pyobjc-framework-Cocoa,
setuptools,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "pyobjc-framework-libdispatch";
pyproject = true;
inherit (pyobjc-core) version src;
patches = pyobjc-core.patches or [ ];
sourceRoot = "${src.name}/pyobjc-framework-libdispatch";
build-system = [ setuptools ];
buildInputs = [
darwin.libffi
];
nativeBuildInputs = [
darwin.DarwinTools # sw_vers
];
nativeCheckInputs = [
unittestCheckHook
];
# 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" \
--replace-fail "/usr/bin/" ""
'';
dependencies = [
pyobjc-core
pyobjc-framework-Cocoa
];
env.NIX_CFLAGS_COMPILE = toString [
"-I${darwin.libffi.dev}/include"
"-Wno-error=unused-command-line-argument"
];
pythonImportsCheck = [
"dispatch"
"libdispatch"
];
meta = {
description = "PyObjC wrappers for the libdispatch framework on macOS";
homepage = "https://github.com/ronaldoussoren/pyobjc/tree/main/pyobjc-framework-libdispatch";
license = lib.licenses.mit;
platforms = lib.platforms.darwin;
maintainers = with lib.maintainers; [ prusnak ];
};
}
+4
View File
@@ -13954,6 +13954,10 @@ self: super: with self; {
pyobjc-framework-WebKit = callPackage ../development/python-modules/pyobjc-framework-WebKit { };
pyobjc-framework-libdispatch =
callPackage ../development/python-modules/pyobjc-framework-libdispatch
{ };
pyocd = callPackage ../development/python-modules/pyocd { };
pyocd-pemicro = callPackage ../development/python-modules/pyocd-pemicro { };