From 9ac4852b3d281e2800d80d4e08c256b8ce2cf4a0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Sun, 10 Jul 2022 11:08:47 +0200 Subject: [PATCH 1/2] python310Packages.aio-geojson-usgs-earthquakes: init at 0.1 --- .../aio-geojson-usgs-earthquakes/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix diff --git a/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix new file mode 100644 index 000000000000..0fde28910415 --- /dev/null +++ b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix @@ -0,0 +1,51 @@ +{ lib +, aio-geojson-client +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pytz +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aio-geojson-usgs-earthquakes"; + version = "0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-aio-geojson-usgs-earthquakes"; + rev = "v${version}"; + hash = "sha256-Hb0/BdK/jjxlPl9WJJpFdOCzZpZDCguXoGreGIyN8oo="; + }; + + propagatedBuildInputs = [ + aio-geojson-client + aiohttp + pytz + ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aio_geojson_usgs_earthquakes" + ]; + + meta = with lib; { + description = "Python module for accessing the U.S. Geological Survey Earthquake Hazards Program feeds"; + homepage = "https://github.com/exxamalte/python-aio-geojson-usgs-earthquakes"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index df044ef44b38..1ad375be219b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -241,6 +241,8 @@ in { aio-geojson-nsw-rfs-incidents = callPackage ../development/python-modules/aio-geojson-nsw-rfs-incidents { }; + aio-geojson-usgs-earthquakes = callPackage ../development/python-modules/aio-geojson-usgs-earthquakes { }; + aio-georss-client = callPackage ../development/python-modules/aio-georss-client { }; aio-georss-gdacs = callPackage ../development/python-modules/aio-georss-gdacs { }; From accc93f1dc7a5d0863601f40fba19b5303e06042 Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Sun, 10 Jul 2022 11:10:13 +0200 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 1c65fce6e7fe..0fb57ef07f70 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2917,7 +2917,8 @@ "uscis" = ps: with ps; [ ]; # missing inputs: uscisstatus "usgs_earthquakes_feed" = ps: with ps; [ - ]; # missing inputs: aio_geojson_usgs_earthquakes + aio-geojson-usgs-earthquakes + ]; "utility_meter" = ps: with ps; [ croniter ]; @@ -3803,6 +3804,7 @@ "uptime" "uptimerobot" "usb" + "usgs_earthquakes_feed" "utility_meter" "uvc" "vacuum"