2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freezegun,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-02-13 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiorecollect";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2023.12.0";
|
2021-02-13 14:23:35 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Rj0+r7eERLY5VzmuDQH/TeVLfmvmKwPqcvd1b/To0Ts=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
# this is not used directly by the project
|
|
|
|
sed -i '/certifi =/d' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
aresponses
|
|
|
|
freezegun
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Ignore the examples directory as the files are prefixed with test_.
|
|
|
|
"examples/"
|
|
|
|
];
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiorecollect" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for the Recollect Waste API";
|
|
|
|
longDescription = ''
|
|
|
|
aiorecollect is a Python asyncio-based library for the ReCollect
|
|
|
|
Waste API. It allows users to programmatically retrieve schedules
|
|
|
|
for waste removal in their area, including trash, recycling, compost
|
|
|
|
and more.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/bachya/aiorecollect";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/bachya/aiorecollect/releases/tag/${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|