1{ 2 lib, 3 aiohttp, 4 aresponses, 5 async-timeout, 6 backoff, 7 buildPythonPackage, 8 fetchFromGitHub, 9 poetry-core, 10 pytest-asyncio, 11 pytestCheckHook, 12 pythonOlder, 13 sigstore, 14}: 15 16buildPythonPackage rec { 17 pname = "aiogithubapi"; 18 version = "24.6.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "ludeeus"; 25 repo = "aiogithubapi"; 26 tag = version; 27 hash = "sha256-z7l7Qx9Kg1FZ9nM0V2NzTyi3gbE2hakbc/GZ1CzDmKw="; 28 }; 29 30 __darwinAllowLocalNetworking = true; 31 32 pythonRelaxDeps = [ "async-timeout" ]; 33 34 postPatch = '' 35 # Upstream is releasing with the help of a CI to PyPI, GitHub releases 36 # are not in their focus 37 substituteInPlace pyproject.toml \ 38 --replace-fail 'version = "0"' 'version = "${version}"' 39 ''; 40 41 build-system = [ poetry-core ]; 42 43 dependencies = [ 44 aiohttp 45 async-timeout 46 backoff 47 ]; 48 49 # Optional dependencies for deprecated-verify are not added 50 # Only sigstore < 2 is supported 51 52 nativeCheckInputs = [ 53 aresponses 54 pytest-asyncio 55 pytestCheckHook 56 ]; 57 58 pytestFlagsArray = [ "--asyncio-mode=auto" ]; 59 60 preCheck = '' 61 export HOME=$(mktemp -d) 62 63 # Need sigstore is an optional dependencies and need <2 64 rm -rf tests/test_helper.py 65 ''; 66 67 pythonImportsCheck = [ "aiogithubapi" ]; 68 69 meta = { 70 description = "Python client for the GitHub API"; 71 homepage = "https://github.com/ludeeus/aiogithubapi"; 72 changelog = "https://github.com/ludeeus/aiogithubapi/releases/tag/${version}"; 73 license = lib.licenses.mit; 74 maintainers = with lib.maintainers; [ fab ]; 75 }; 76}