Files
nixpkgs/pkgs/development/python-modules/eiswarnung/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

64 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
pytz,
yarl,
}:
buildPythonPackage rec {
pname = "eiswarnung";
version = "2.0.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-eiswarnung";
tag = "v${version}";
hash = "sha256-/61qrRfD7/gaEcvFot34HYXOVLWwTDi/fvcgHDTv9u0=";
};
__darwinAllowLocalNetworking = true;
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"0.0.0"' '"${version}"'
'';
pythonRelaxDeps = [ "pytz" ];
build-system = [ poetry-core ];
dependencies = [
aiohttp
pytz
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "eiswarnung" ];
meta = {
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 lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
};
}