From a6252afa36d613228430008b07372237b39164c0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 20:10:32 +0200 Subject: [PATCH 1/3] python3Packages.pymeteireann: init at 0.2 --- .../python-modules/pymeteireann/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/pymeteireann/default.nix diff --git a/pkgs/development/python-modules/pymeteireann/default.nix b/pkgs/development/python-modules/pymeteireann/default.nix new file mode 100644 index 000000000000..7e48a4089a12 --- /dev/null +++ b/pkgs/development/python-modules/pymeteireann/default.nix @@ -0,0 +1,39 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, pytz +, xmltodict +}: + +buildPythonPackage rec { + pname = "pymeteireann"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "DylanGore"; + repo = "PyMetEireann"; + rev = version; + sha256 = "1904f8mvv4ghzbniswmdwyj5v71m6y3yn1b4grjvfds05skalm67"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + pytz + xmltodict + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "meteireann" ]; + + meta = with lib; { + description = "Python module to communicate with the Met Éireann Public Weather Forecast API"; + homepage = "https://github.com/DylanGore/PyMetEireann/"; + 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 33559777930e..9e162f131ce3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5769,6 +5769,8 @@ in { pymetar = callPackage ../development/python-modules/pymetar { }; + pymeteireann = callPackage ../development/python-modules/pymeteireann { }; + pymetno = callPackage ../development/python-modules/pymetno { }; pymitv = callPackage ../development/python-modules/pymitv { }; From 29b2ee5b07afb5da4e571b5b95c6591d3d86c4e1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 20:11:17 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 28b7aed5f397..bf1aa9d76c73 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -495,7 +495,7 @@ "meraki" = ps: with ps; [ aiohttp-cors ]; "message_bird" = ps: with ps; [ ]; # missing inputs: messagebird "met" = ps: with ps; [ pymetno ]; - "met_eireann" = ps: with ps; [ ]; # missing inputs: pyMetEireann + "met_eireann" = ps: with ps; [ pymeteireann ]; "meteo_france" = ps: with ps; [ ]; # missing inputs: meteofrance-api "meteoalarm" = ps: with ps; [ ]; # missing inputs: meteoalertapi "metoffice" = ps: with ps; [ ]; # missing inputs: datapoint From d79f71927c692dfa1970e8d7caad117c49e578b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 20:11:52 +0200 Subject: [PATCH 3/3] home-assistant: enable met_eireann tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 4df380e2b5a0..310deda06ce9 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -291,6 +291,7 @@ in with py.pkgs; buildPythonApplication rec { "media_player" "media_source" "met" + "met_eireann" "minecraft_server" "mobile_app" "modbus"