1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 setuptools-scm,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "rubicon-objc";
13 version = "0.5.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "beeware";
20 repo = "rubicon-objc";
21 tag = "v${version}";
22 hash = "sha256-yEsW8xHW004O7aDU4/mlbfTuF2H5UcpbNR9NACxQv3M=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "setuptools==75.7.0" "setuptools" \
28 --replace-fail "setuptools_scm==8.1.0" "setuptools_scm"
29 '';
30
31 build-system = [
32 setuptools
33 setuptools-scm
34 ];
35
36 preCheck = ''
37 make -C tests/objc
38 '';
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 pythonImportsCheck = [ "rubicon.objc" ];
43
44 __darwinAllowLocalNetworking = true;
45
46 meta = {
47 description = "Bridge interface between Python and Objective-C";
48 homepage = "https://github.com/beeware/rubicon-objc/";
49 changelog = "https://github.com/beeware/rubicon-objc/releases/tag/${src.tag}";
50 license = lib.licenses.bsd3;
51 maintainers = with lib.maintainers; [ natsukium ];
52 platforms = lib.platforms.darwin;
53 };
54}