2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, authlib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
2024-04-21 15:54:59 +00:00
|
|
|
, mashumaro
|
|
|
|
, orjson
|
2023-10-09 19:29:22 +00:00
|
|
|
, pytest-httpx
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, pytz
|
|
|
|
, respx
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydiscovergy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.0.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jpbede";
|
|
|
|
repo = "pydiscovergy";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-ArcH/4ZyOtIGmoXArU+oEd357trJnS9umlN9B+U0dBI=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/addopts =/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
authlib
|
|
|
|
httpx
|
2024-04-21 15:54:59 +00:00
|
|
|
mashumaro
|
|
|
|
orjson
|
2023-10-09 19:29:22 +00:00
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-httpx
|
|
|
|
pytestCheckHook
|
|
|
|
respx
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pydiscovergy"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Async Python 3 library for interacting with the Discovergy API";
|
|
|
|
homepage = "https://github.com/jpbede/pydiscovergy";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jpbede/pydiscovergy/releases/tag/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|