2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, async-timeout
|
|
|
|
, backoff
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, poetry-core
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiogithubapi";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "22.10.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ludeeus";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-ceBuqaMqqL6qwN52765MG4sLt+08hx2G9rUVNC7x6ik=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream is releasing with the help of a CI to PyPI, GitHub releases
|
|
|
|
# are not in their focus
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0"' 'version = "${version}"' \
|
|
|
|
--replace 'backoff = "^1.10.0"' 'backoff = "*"'
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
backoff
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiogithubapi"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the GitHub API";
|
|
|
|
homepage = "https://github.com/ludeeus/aiogithubapi";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|