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