Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / eiswarnung / default.nix
blobc4a3cf9339cb7987d89702e84a4647e1b9ab0e09
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pytest-asyncio
8 , pytestCheckHook
9 , pythonOlder
10 , pytz
11 , yarl
14 buildPythonPackage rec {
15   pname = "eiswarnung";
16   version = "2.0.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.11";
21   src = fetchFromGitHub {
22     owner = "klaasnicolaas";
23     repo = "python-eiswarnung";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-/61qrRfD7/gaEcvFot34HYXOVLWwTDi/fvcgHDTv9u0=";
26   };
28   __darwinAllowLocalNetworking = true;
30   postPatch = ''
31     substituteInPlace pyproject.toml \
32       --replace '"0.0.0"' '"${version}"' \
33       --replace 'addopts = "--cov"' "" \
34       --replace 'pytz = ">=2022.7.1,<2024.0.0"' 'pytz = "*"'
35   '';
37   nativeBuildInputs = [
38     poetry-core
39   ];
41   propagatedBuildInputs = [
42     aiohttp
43     pytz
44     yarl
45   ];
47   nativeCheckInputs = [
48     aresponses
49     pytest-asyncio
50     pytestCheckHook
51   ];
53   pythonImportsCheck = [
54     "eiswarnung"
55   ];
57   meta = with lib; {
58     description = "Module for getting Eiswarning API forecasts";
59     homepage = "https://github.com/klaasnicolaas/python-eiswarnung";
60     changelog = "https://github.com/klaasnicolaas/python-eiswarnung/releases/tag/v${version}";
61     license = with licenses; [ mit ];
62     maintainers = with maintainers; [ fab ];
63   };