From 7a09d09030c18e7febcac89b09fddbb5620c3918 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Mar 2021 23:47:24 +0100 Subject: [PATCH 1/3] python3Packages.solaredge: init at 0.0.4 --- .../python-modules/solaredge/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/solaredge/default.nix diff --git a/pkgs/development/python-modules/solaredge/default.nix b/pkgs/development/python-modules/solaredge/default.nix new file mode 100644 index 000000000000..f593ff501620 --- /dev/null +++ b/pkgs/development/python-modules/solaredge/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python-dateutil +, pythonOlder +, pytz +, requests +}: + +buildPythonPackage rec { + pname = "solaredge"; + version = "0.0.4"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "0q4gib0l3qnlpncg84ki027vr1apjlr47vd6845rpk7zkm8lqgfz"; + }; + + propagatedBuildInputs = [ + python-dateutil + pytz + requests + ]; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "solaredge" ]; + + meta = with lib; { + description = "Python wrapper for Solaredge monitoring service"; + homepage = "https://github.com/bertouttier/solaredge"; + 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 c723f37456f6..97b4c2a3e9d3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7767,6 +7767,8 @@ in { softlayer = callPackage ../development/python-modules/softlayer { }; + solaredge = callPackage ../development/python-modules/solaredge { }; + solax = callPackage ../development/python-modules/solax { }; solo-python = disabledIf (!pythonAtLeast "3.6") (callPackage ../development/python-modules/solo-python { }); From fc6900503cdbcdf94d4570af87cc9d69c39c81ce Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Mar 2021 23:49:01 +0100 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 c699830ba666..fec99afdc4f5 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -766,7 +766,7 @@ "snmp" = ps: with ps; [ pysnmp ]; "sochain" = ps: with ps; [ ]; # missing inputs: python-sochain-api "socialblade" = ps: with ps; [ ]; # missing inputs: socialbladeclient - "solaredge" = ps: with ps; [ stringcase ]; # missing inputs: solaredge + "solaredge" = ps: with ps; [ solaredge stringcase ]; "solaredge_local" = ps: with ps; [ ]; # missing inputs: solaredge-local "solarlog" = ps: with ps; [ ]; # missing inputs: sunwatcher "solax" = ps: with ps; [ solax ]; From 70cb86a618268cdbf5cb16384fbe84a76cbe9dc8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Mar 2021 23:49:55 +0100 Subject: [PATCH 3/3] home-assistant: enable solaredge 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 a5949e738b1c..6260906e0c25 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -298,6 +298,7 @@ in with py.pkgs; buildPythonApplication rec { "sensor" "smarttub" "smtp" + "solaredge" "sql" "ssdp" "stream"