1{ lib 2, aiohttp 3, aresponses 4, backoff 5, buildPythonPackage 6, fetchFromGitHub 7, fetchpatch 8, poetry-core 9, pytest-aiohttp 10, pytest-asyncio 11, pytestCheckHook 12, pythonOlder 13}: 14 15buildPythonPackage rec { 16 pname = "pyopenuv"; 17 version = "2023.08.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "bachya"; 24 repo = pname; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-6JYYkEH873beEQf2agAF85YLSb7+n0UVzIuRz3amXpU="; 27 }; 28 29 patches = [ 30 # This patch removes references to setuptools and wheel that are no longer 31 # necessary and changes poetry to poetry-core, so that we don't need to add 32 # unnecessary nativeBuildInputs. 33 # 34 # https://github.com/bachya/pyopenuv/pull/244 35 # 36 (fetchpatch { 37 name = "clean-up-build-dependencies.patch"; 38 url = "https://github.com/bachya/pyopenuv/commit/1663f697dd5528fb03af1400e5ffd3fba076c64c.patch"; 39 hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM="; 40 }) 41 ]; 42 43 nativeBuildInputs = [ 44 poetry-core 45 ]; 46 47 propagatedBuildInputs = [ 48 aiohttp 49 backoff 50 ]; 51 52 __darwinAllowLocalNetworking = true; 53 54 nativeCheckInputs = [ 55 aresponses 56 pytest-asyncio 57 pytest-aiohttp 58 pytestCheckHook 59 ]; 60 61 disabledTestPaths = [ 62 # Ignore the examples as they are prefixed with test_ 63 "examples/" 64 ]; 65 66 pythonImportsCheck = [ 67 "pyopenuv" 68 ]; 69 70 meta = with lib; { 71 description = "Python API to retrieve data from openuv.io"; 72 homepage = "https://github.com/bachya/pyopenuv"; 73 changelog = "https://github.com/bachya/pyopenuv/releases/tag/${version}"; 74 license = with licenses; [ mit ]; 75 maintainers = with maintainers; [ fab ]; 76 }; 77}