94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pytz
|
|
, yarl
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "eiswarnung";
|
|
version = "1.2.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "klaasnicolaas";
|
|
repo = "python-eiswarnung";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-PVFAy34+UfNQNdzVdfvNiySrCTaKGuepnTINZYkOsuo=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace '"0.0.0"' '"${version}"' \
|
|
--replace 'addopts = "--cov"' "" \
|
|
--replace 'pytz = "^2022.7.1"' 'pytz = "*"'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
pytz
|
|
yarl
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"eiswarnung"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Module for getting Eiswarning API forecasts";
|
|
homepage = "https://github.com/klaasnicolaas/python-eiswarnung";
|
|
changelog = "https://github.com/klaasnicolaas/python-eiswarnung/releases/tag/v${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|