From 9b307dd741efa4bcd1976eb9379207a781976334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 13:47:46 +0200 Subject: [PATCH 1/3] python3Packages.goalzero: init at 0.1.7 --- .../python-modules/goalzero/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/goalzero/default.nix diff --git a/pkgs/development/python-modules/goalzero/default.nix b/pkgs/development/python-modules/goalzero/default.nix new file mode 100644 index 000000000000..e0e52b6702d9 --- /dev/null +++ b/pkgs/development/python-modules/goalzero/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, aiohttp +, ratelimit +}: + +buildPythonPackage rec { + pname = "goalzero"; + version = "0.1.7"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1f6a2755a745ea14e65d6bf3e56bd090a508bf6f63ccb76b9b89ce3d844a2160"; + }; + + propagatedBuildInputs = [ + aiohttp + ratelimit + ]; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ "goalzero" ]; + + meta = with lib; { + description = "Goal Zero Yeti REST Api Library"; + homepage = "https://github.com/tkdrob/goalzero"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 865c6aa8fcb3..4d8076a4c57e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2862,6 +2862,8 @@ in { gnureadline = callPackage ../development/python-modules/gnureadline { }; + goalzero = callPackage ../development/python-modules/goalzero { }; + goobook = callPackage ../development/python-modules/goobook { }; goocalendar = callPackage ../development/python-modules/goocalendar { }; From 900dc8924e802e6c4ed26fa4c7c95870346f6ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 13:48:19 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- 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 04d3b5baa4c1..a14476ac4d3b 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -312,7 +312,7 @@ "glances" = ps: with ps; [ glances-api ]; "gntp" = ps: with ps; [ gntp ]; "goalfeed" = ps: with ps; [ ]; # missing inputs: pysher - "goalzero" = ps: with ps; [ ]; # missing inputs: goalzero + "goalzero" = ps: with ps; [ goalzero ]; "gogogate2" = ps: with ps; [ ismartgate ]; "google" = ps: with ps; [ google-api-python-client httplib2 oauth2client ]; "google_assistant" = ps: with ps; [ aiohttp-cors ]; From 852ace964448161463575d42e39721724d4d5ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Jun 2021 13:51:17 +0200 Subject: [PATCH 3/3] home-assistant: test goalzero component --- 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 eb2fa70bbb92..c4efc25351f9 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -405,6 +405,7 @@ in with py.pkgs; buildPythonApplication rec { "geonetnz_volcano" "gios" "glances" + "goalzero" "gogogate2" "google" "google_assistant"