2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
yarl,
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "eiswarnung";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.0.0";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klaasnicolaas";
|
|
|
|
repo = "python-eiswarnung";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-/61qrRfD7/gaEcvFot34HYXOVLWwTDi/fvcgHDTv9u0=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail '"0.0.0"' '"${version}"'
|
2023-05-24 13:37:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRelaxDeps = [ "pytz" ];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-02-20 05:27:41 +00:00
|
|
|
aiohttp
|
2023-02-22 10:55:15 +00:00
|
|
|
pytz
|
2022-02-20 05:27:41 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
2022-02-20 05:27:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "eiswarnung" ];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for getting Eiswarning API forecasts";
|
|
|
|
homepage = "https://github.com/klaasnicolaas/python-eiswarnung";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/klaasnicolaas/python-eiswarnung/releases/tag/v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|