From 524321e0377635f9dd4dce7e3a467d1fd895d95f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 8 Jul 2021 13:49:12 +0200 Subject: [PATCH 1/2] python3Packages.pyfronius: init at 0.5.2 --- .../python-modules/pyfronius/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pyfronius/default.nix diff --git a/pkgs/development/python-modules/pyfronius/default.nix b/pkgs/development/python-modules/pyfronius/default.nix new file mode 100644 index 000000000000..be226d744b8b --- /dev/null +++ b/pkgs/development/python-modules/pyfronius/default.nix @@ -0,0 +1,37 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyfronius"; + version = "0.5.2"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "nielstron"; + repo = pname; + rev = version; + sha256 = "013nlxbpicm4d07q8cjkbwh6xbji8am5la9vv5iqjyk0h4c2hgr7"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pyfronius" ]; + + meta = with lib; { + description = "Python module to communicate with Fronius Symo"; + homepage = "https://github.com/nielstron/pyfronius"; + 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 f77b3f265a5f..c8d101cc282d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5952,6 +5952,8 @@ in { pyfritzhome = callPackage ../development/python-modules/pyfritzhome { }; + pyfronius = callPackage ../development/python-modules/pyfronius { }; + pyftdi = callPackage ../development/python-modules/pyftdi { }; pyftgl = callPackage ../development/python-modules/pyftgl { }; From 406b6a53e2f83c8c8484d3888a92c5493a577fb8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 8 Jul 2021 13:49:36 +0200 Subject: [PATCH 2/2] 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 dbe9c938c678..123984e66a49 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -287,7 +287,7 @@ "fritzbox" = ps: with ps; [ pyfritzhome ]; "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ]; "fritzbox_netmonitor" = ps: with ps; [ fritzconnection ]; - "fronius" = ps: with ps; [ ]; # missing inputs: pyfronius + "fronius" = ps: with ps; [ pyfronius ]; "frontend" = ps: with ps; [ aiohttp-cors home-assistant-frontend pillow ]; "frontier_silicon" = ps: with ps; [ ]; # missing inputs: afsapi "futurenow" = ps: with ps; [ pyfnip ];