From 6e76ab58412dee8c7d10fa91c6b563a48c306143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 23:20:17 +0200 Subject: [PATCH 1/3] python3Packages.python-izone: init at 1.1.5 --- .../python-modules/python-izone/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/python-izone/default.nix diff --git a/pkgs/development/python-modules/python-izone/default.nix b/pkgs/development/python-modules/python-izone/default.nix new file mode 100644 index 000000000000..5033ef3e2cff --- /dev/null +++ b/pkgs/development/python-modules/python-izone/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, aiohttp +, netifaces +, asynctest +, pytest-aiohttp +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-izone"; + version = "1.1.5"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "Swamp-Ig"; + repo = "pizone"; + rev = "v${version}"; + sha256 = "0ilvawlhyg5p08ri26zbcvgysrfsmza23scy4ijrx3jbc3669r2c"; + }; + + propagatedBuildInputs = [ + aiohttp + netifaces + ]; + + checkInputs = [ + asynctest + pytest-aiohttp + pytestCheckHook + ]; + + disabledTests = [ + # attempt network connection + "test_fail_on_connect" + "test_connection_lost" + "test_ip_addr_change" + ]; + + pythonImportsCheck = [ "pizone" ]; + + meta = with lib; { + description = "A python interface to the iZone airconditioner controller"; + homepage = "https://github.com/Swamp-Ig/pizone"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4174266094ad..749a7b7c667f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5319,6 +5319,8 @@ in { python-ecobee-api = callPackage ../development/python-modules/python-ecobee-api { }; + python-izone = callPackage ../development/python-modules/python-izone { }; + python-openems = callPackage ../development/python-modules/python-openems { }; python-openzwave-mqtt = callPackage ../development/python-modules/python-openzwave-mqtt { }; From dbd6b2279cae8596f57e54a775add8eef92990aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 24 Jun 2021 18:16:13 +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 993ac5e85754..97dc493d5860 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -414,7 +414,7 @@ "isy994" = ps: with ps; [ pyisy ]; "itach" = ps: with ps; [ ]; # missing inputs: pyitachip2ir "itunes" = ps: with ps; [ ]; - "izone" = ps: with ps; [ ]; # missing inputs: python-izone + "izone" = ps: with ps; [ python-izone ]; "jewish_calendar" = ps: with ps; [ hdate ]; "joaoapps_join" = ps: with ps; [ ]; # missing inputs: python-join-api "juicenet" = ps: with ps; [ ]; # missing inputs: python-juicenet From 6ba0fd8d5b76a71fdf4e57de21048120e4e03f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 24 Jun 2021 18:17:48 +0200 Subject: [PATCH 3/3] home-assistant: test izone 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 99fc258756c7..d13b87ceb2f0 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -486,6 +486,7 @@ in with py.pkgs; buildPythonApplication rec { "iqvia" "islamic_prayer_times" "isy994" + "izone" "jewish_calendar" "kira" "kmtronic"