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.2"; 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-ahlsY4eU9n+BRexE4wNVXMcgSiGW7pU25zJif9lGTUs="; 23 }; 24 25 postPatch = '' 26 sed -i 's/"setuptools==.*"/"setuptools"/' pyproject.toml 27 sed -i 's/"setuptools_scm==.*"/"setuptools_scm"/' pyproject.toml 28 ''; 29 30 build-system = [ 31 setuptools 32 setuptools-scm 33 ]; 34 35 preCheck = '' 36 make -C tests/objc 37 ''; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 pythonImportsCheck = [ "rubicon.objc" ]; 42 43 __darwinAllowLocalNetworking = true; 44 45 meta = { 46 description = "Bridge interface between Python and Objective-C"; 47 homepage = "https://github.com/beeware/rubicon-objc/"; 48 changelog = "https://github.com/beeware/rubicon-objc/releases/tag/${src.tag}"; 49 license = lib.licenses.bsd3; 50 maintainers = with lib.maintainers; [ natsukium ]; 51 platforms = lib.platforms.darwin; 52 }; 53}