diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2022-02-16 00:12:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 00:12:42 +0100 |
commit | c04c7ed479039983a0759f6cf5a376d1a4b69de6 (patch) | |
tree | 572ae24ceeb34cf4a4ced6b865f5220ed99fc788 /pkgs | |
parent | 6f42118e98f352bb0b98c4f18f43ada1987db0df (diff) | |
parent | 6e6c0b086dde14a032302cad6ce41e5d829139a3 (diff) |
Merge pull request #160141 from fabaff/eiswarnung
python3Packages.eiswarnung: init at 1.0.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/eiswarnung/default.nix | 58 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/eiswarnung/default.nix b/pkgs/development/python-modules/eiswarnung/default.nix new file mode 100644 index 0000000000000..87ff2a4287ac6 --- /dev/null +++ b/pkgs/development/python-modules/eiswarnung/default.nix @@ -0,0 +1,58 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "eiswarnung"; + version = "1.0.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "klaasnicolaas"; + repo = "python-eiswarnung"; + rev = "v${version}"; + hash = "sha256-Cw/xRypErasdrOZJ/0dWLl4eYH01vBI9mYm98teIdRc="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"0.0.0"' '"${version}"' \ + --replace 'addopts = "--cov"' "" + ''; + + pythonImportsCheck = [ + "eiswarnung" + ]; + + meta = with lib; { + description = "Module for getting Eiswarning API forecasts"; + homepage = "https://github.com/klaasnicolaas/python-eiswarnung"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ac36469f3fdbd..02b2b7a5fb7b5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2535,6 +2535,8 @@ in { einops = callPackage ../development/python-modules/einops { }; + eiswarnung = callPackage ../development/python-modules/eiswarnung { }; + elgato = callPackage ../development/python-modules/elgato { }; elkm1-lib = callPackage ../development/python-modules/elkm1-lib { }; |