diff --git a/pkgs/development/python-modules/aio-geojson-client/default.nix b/pkgs/development/python-modules/aio-geojson-client/default.nix new file mode 100644 index 000000000000..2c64230db266 --- /dev/null +++ b/pkgs/development/python-modules/aio-geojson-client/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, geojson +, haversine +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "aio-geojson-client"; + version = "0.14"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-aio-geojson-client"; + rev = "v${version}"; + sha256 = "1nk0mas71n1bn4wc7pcv279i1b5mxy9phyc8ppxlb16kbjnjj0h8"; + }; + + propagatedBuildInputs = [ + aiohttp + geojson + haversine + ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "aio_geojson_client" ]; + + meta = with lib; { + description = "Python module for accessing GeoJSON feeds"; + homepage = "https://github.com/exxamalte/python-aio-geojson-client"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix b/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix new file mode 100644 index 000000000000..2def7919fa11 --- /dev/null +++ b/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix @@ -0,0 +1,43 @@ +{ lib +, aio-geojson-client +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pytz +}: + +buildPythonPackage rec { + pname = "aio-geojson-geonetnz-quakes"; + version = "0.12"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-aio-geojson-geonetnz-quakes"; + rev = "v${version}"; + sha256 = "166gvcc1rzigb822k1373y18k54x5aklikr8sc7hyml5vz937xr7"; + }; + + propagatedBuildInputs = [ + aio-geojson-client + aiohttp + pytz + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "aio_geojson_geonetnz_quakes" ]; + + meta = with lib; { + description = "Python module for accessing the GeoNet NZ Quakes GeoJSON feeds"; + homepage = "https://github.com/exxamalte/pythonaio-geojson-geonetnz-quakes"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aio-geojson-geonetnz-volcano/default.nix b/pkgs/development/python-modules/aio-geojson-geonetnz-volcano/default.nix new file mode 100644 index 000000000000..97adb2f8fe07 --- /dev/null +++ b/pkgs/development/python-modules/aio-geojson-geonetnz-volcano/default.nix @@ -0,0 +1,45 @@ +{ lib +, aio-geojson-client +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pytz +}: + +buildPythonPackage rec { + pname = "aio-geojson-geonetnz-volcano"; + version = "0.5"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-aio-geojson-geonetnz-volcano"; + rev = "v${version}"; + sha256 = "0x4i9gjwb2j788aw4j47bxin0d2ma3khssprq4ga3cjzx2qjwjvn"; + }; + + propagatedBuildInputs = [ + aio-geojson-client + aiohttp + pytz + ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "aio_geojson_geonetnz_volcano" ]; + + meta = with lib; { + description = "Python module for accessing the GeoNet NZ Volcanic GeoJSON feeds"; + homepage = "https://github.com/exxamalte/pythonaio-geojson-geonetnz-volcano"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aio-geojson-nsw-rfs-incidents/default.nix b/pkgs/development/python-modules/aio-geojson-nsw-rfs-incidents/default.nix new file mode 100644 index 000000000000..792f91bc7f11 --- /dev/null +++ b/pkgs/development/python-modules/aio-geojson-nsw-rfs-incidents/default.nix @@ -0,0 +1,45 @@ +{ lib +, aio-geojson-client +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pytz +}: + +buildPythonPackage rec { + pname = "aio-geojson-nsw-rfs-incidents"; + version = "0.4"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-aio-geojson-nsw-rfs-incidents"; + rev = "v${version}"; + sha256 = "sha256-o9tuoJ7VZ6bg0rYeRWClKxdbxxj6wPgkSF7ZdOfmJew="; + }; + + propagatedBuildInputs = [ + aio-geojson-client + aiohttp + pytz + ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "aio_geojson_nsw_rfs_incidents" ]; + + meta = with lib; { + description = "Python module for accessing the NSW Rural Fire Service incidents feeds"; + homepage = "https://github.com/exxamalte/python-aio-geojson-nsw-rfs-incidents"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index f7f5f589f62a..e62d3dbcf4b0 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -303,8 +303,8 @@ "geo_location" = ps: with ps; [ ]; "geo_rss_events" = ps: with ps; [ georss-generic-client ]; "geofency" = ps: with ps; [ aiohttp-cors ]; - "geonetnz_quakes" = ps: with ps; [ ]; # missing inputs: aio_geojson_geonetnz_quakes - "geonetnz_volcano" = ps: with ps; [ ]; # missing inputs: aio_geojson_geonetnz_volcano + "geonetnz_quakes" = ps: with ps; [ aio-geojson-geonetnz-quakes ]; + "geonetnz_volcano" = ps: with ps; [ aio-geojson-geonetnz-volcano ]; "gios" = ps: with ps; [ gios ]; "github" = ps: with ps; [ PyGithub ]; "gitlab_ci" = ps: with ps; [ python-gitlab ]; @@ -576,7 +576,7 @@ "notify_events" = ps: with ps; [ ]; # missing inputs: notify-events "notion" = ps: with ps; [ aionotion ]; "nsw_fuel_station" = ps: with ps; [ ]; # missing inputs: nsw-fuel-api-client - "nsw_rural_fire_service_feed" = ps: with ps; [ ]; # missing inputs: aio_geojson_nsw_rfs_incidents + "nsw_rural_fire_service_feed" = ps: with ps; [ aio-geojson-nsw-rfs-incidents ]; "nuheat" = ps: with ps; [ ]; # missing inputs: nuheat "nuki" = ps: with ps; [ pynuki ]; "numato" = ps: with ps; [ ]; # missing inputs: numato-gpio diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index da3e16b0a209..551ab4dedf64 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -391,7 +391,10 @@ in with py.pkgs; buildPythonApplication rec { "generic_thermostat" "geo_json_events" "geo_location" + "geo_rss_events" "geofency" + "geonetnz_quakes" + "geonetnz_volcano" "glances" "gios" "gogogate2" @@ -505,6 +508,7 @@ in with py.pkgs; buildPythonApplication rec { "no_ip" "notify" "notion" + "nsw_rural_fire_service_feed" "nuki" "number" "nws" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c76f3753ad55..a84a3adfb507 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -225,6 +225,14 @@ in { agent-py = callPackage ../development/python-modules/agent-py { }; + aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { }; + + aio-geojson-geonetnz-quakes = callPackage ../development/python-modules/aio-geojson-geonetnz-quakes { }; + + aio-geojson-geonetnz-volcano = callPackage ../development/python-modules/aio-geojson-geonetnz-volcano { }; + + aio-geojson-nsw-rfs-incidents = callPackage ../development/python-modules/aio-geojson-nsw-rfs-incidents { }; + aio-georss-client = callPackage ../development/python-modules/aio-georss-client { }; aio-georss-gdacs = callPackage ../development/python-modules/aio-georss-gdacs { };