1{ lib 2, aiohttp 3, aresponses 4, async-timeout 5, backoff 6, buildPythonPackage 7, fetchFromGitHub 8, poetry-core 9, pytest-asyncio 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "aiogithubapi"; 16 version = "23.2.1"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "ludeeus"; 23 repo = pname; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-J6kcEVqADmVJZDbU9eqLCL0rohMSA/Ig7FSp/Ye5Sfk="; 26 }; 27 28 postPatch = '' 29 # Upstream is releasing with the help of a CI to PyPI, GitHub releases 30 # are not in their focus 31 substituteInPlace pyproject.toml \ 32 --replace 'version = "0"' 'version = "${version}"' \ 33 --replace 'backoff = "^1.10.0"' 'backoff = "*"' 34 ''; 35 36 nativeBuildInputs = [ 37 poetry-core 38 ]; 39 40 propagatedBuildInputs = [ 41 aiohttp 42 async-timeout 43 backoff 44 ]; 45 46 nativeCheckInputs = [ 47 aresponses 48 pytest-asyncio 49 pytestCheckHook 50 ]; 51 52 pytestFlagsArray = [ 53 "--asyncio-mode=auto" 54 ]; 55 56 pythonImportsCheck = [ 57 "aiogithubapi" 58 ]; 59 60 meta = with lib; { 61 description = "Python client for the GitHub API"; 62 homepage = "https://github.com/ludeeus/aiogithubapi"; 63 changelog = "https://github.com/ludeeus/aiogithubapi/releases/tag/${version}"; 64 license = with licenses; [ mit ]; 65 maintainers = with maintainers; [ fab ]; 66 }; 67}