tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.pyobjc-core: init at 11.0
Samuel Ainsworth
1 year ago
8a4b47d7
8c9ee722
+63
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
pyobjc-core
default.nix
top-level
python-packages.nix
+61
pkgs/development/python-modules/pyobjc-core/default.nix
reviewed
···
1
1
+
{
2
2
+
buildPythonPackage,
3
3
+
darwin,
4
4
+
fetchFromGitHub,
5
5
+
lib,
6
6
+
setuptools,
7
7
+
}:
8
8
+
9
9
+
buildPythonPackage rec {
10
10
+
pname = "pyobjc-core";
11
11
+
version = "11.0";
12
12
+
pyproject = true;
13
13
+
14
14
+
src = fetchFromGitHub {
15
15
+
owner = "ronaldoussoren";
16
16
+
repo = "pyobjc";
17
17
+
tag = "v${version}";
18
18
+
hash = "sha256-RhB0Ht6vyDxYwDGS+A9HZL9ySIjWlhdB4S+gHxvQQBg=";
19
19
+
};
20
20
+
21
21
+
sourceRoot = "source/pyobjc-core";
22
22
+
23
23
+
build-system = [ setuptools ];
24
24
+
25
25
+
buildInputs = [
26
26
+
darwin.DarwinTools
27
27
+
darwin.libffi
28
28
+
];
29
29
+
30
30
+
nativeBuildInputs = [
31
31
+
darwin.DarwinTools # sw_vers
32
32
+
];
33
33
+
34
34
+
# See https://github.com/ronaldoussoren/pyobjc/pull/641. Unfortunately, we
35
35
+
# cannot just pull that diff with fetchpatch due to https://discourse.nixos.org/t/how-to-apply-patches-with-sourceroot/59727.
36
36
+
postPatch = ''
37
37
+
for file in Modules/objc/test/*.m; do
38
38
+
substituteInPlace "$file" --replace "[[clang::suppress]]" ""
39
39
+
done
40
40
+
41
41
+
substituteInPlace setup.py \
42
42
+
--replace-fail "-buildversion" "-buildVersion" \
43
43
+
--replace-fail "-productversion" "-productVersion"
44
44
+
'';
45
45
+
46
46
+
env.NIX_CFLAGS_COMPILE = toString [
47
47
+
"-I${darwin.libffi.dev}/include"
48
48
+
"-Wno-error=cast-function-type-mismatch"
49
49
+
"-Wno-error=unused-command-line-argument"
50
50
+
];
51
51
+
52
52
+
pythonImportsCheck = [ "objc" ];
53
53
+
54
54
+
meta = with lib; {
55
55
+
description = "Python <-> Objective-C bridge";
56
56
+
homepage = "https://github.com/ronaldoussoren/pyobjc";
57
57
+
license = licenses.mit;
58
58
+
platforms = platforms.darwin;
59
59
+
maintainers = with maintainers; [ samuela ];
60
60
+
};
61
61
+
}
+2
pkgs/top-level/python-packages.nix
reviewed
···
12317
12317
12318
12318
pyobihai = callPackage ../development/python-modules/pyobihai { };
12319
12319
12320
12320
+
pyobjc-core = callPackage ../development/python-modules/pyobjc-core { };
12321
12321
+
12320
12322
pyocd = callPackage ../development/python-modules/pyocd { };
12321
12323
12322
12324
pyocd-pemicro = callPackage ../development/python-modules/pyocd-pemicro { };