File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed
development/python-modules/pyobjc-core Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ buildPythonPackage ,
3+ darwin ,
4+ fetchFromGitHub ,
5+ lib ,
6+ setuptools ,
7+ } :
8+
9+ buildPythonPackage rec {
10+ pname = "pyobjc-core" ;
11+ version = "11.0" ;
12+ pyproject = true ;
13+
14+ src = fetchFromGitHub {
15+ owner = "ronaldoussoren" ;
16+ repo = "pyobjc" ;
17+ tag = "v${ version } " ;
18+ hash = "sha256-RhB0Ht6vyDxYwDGS+A9HZL9ySIjWlhdB4S+gHxvQQBg=" ;
19+ } ;
20+
21+ sourceRoot = "source/pyobjc-core" ;
22+
23+ build-system = [ setuptools ] ;
24+
25+ buildInputs = [
26+ darwin . DarwinTools
27+ darwin . libffi
28+ ] ;
29+
30+ nativeBuildInputs = [
31+ darwin . DarwinTools # sw_vers
32+ ] ;
33+
34+ # See https://github.com/ronaldoussoren/pyobjc/pull/641. Unfortunately, we
35+ # cannot just pull that diff with fetchpatch due to https://discourse.nixos.org/t/how-to-apply-patches-with-sourceroot/59727.
36+ postPatch = ''
37+ for file in Modules/objc/test/*.m; do
38+ substituteInPlace "$file" --replace "[[clang::suppress]]" ""
39+ done
40+
41+ substituteInPlace setup.py \
42+ --replace-fail "-buildversion" "-buildVersion" \
43+ --replace-fail "-productversion" "-productVersion"
44+ '' ;
45+
46+ env . NIX_CFLAGS_COMPILE = toString [
47+ "-I${ darwin . libffi . dev } /include"
48+ "-Wno-error=cast-function-type-mismatch"
49+ "-Wno-error=unused-command-line-argument"
50+ ] ;
51+
52+ pythonImportsCheck = [ "objc" ] ;
53+
54+ meta = with lib ; {
55+ description = "Python <-> Objective-C bridge" ;
56+ homepage = "https://github.com/ronaldoussoren/pyobjc" ;
57+ license = licenses . mit ;
58+ platforms = platforms . darwin ;
59+ maintainers = with maintainers ; [ samuela ] ;
60+ } ;
61+ }
Original file line number Diff line number Diff line change @@ -12317,6 +12317,8 @@ self: super: with self; {
1231712317
1231812318 pyobihai = callPackage ../development/python-modules/pyobihai { };
1231912319
12320+ pyobjc-core = callPackage ../development/python-modules/pyobjc-core { };
12321+
1232012322 pyocd = callPackage ../development/python-modules/pyocd { };
1232112323
1232212324 pyocd-pemicro = callPackage ../development/python-modules/pyocd-pemicro { };
You can’t perform that action at this time.
0 commit comments