about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-06-23 23:20:17 +0200
committerRobert Schütz <dev@schuetz-co.de>2021-06-24 18:15:46 +0200
commit6e76ab58412dee8c7d10fa91c6b563a48c306143 (patch)
tree851675faba5cc0b8e6b1ca3304c7b7091bc1163e /pkgs
parent997977a64e6501e68543ac9491987556aa38b5c8 (diff)
python3Packages.python-izone: init at 1.1.5
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/python-izone/default.nix51
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 53 insertions, 0 deletions
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 0000000000000..5033ef3e2cff5
--- /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 4174266094ad0..749a7b7c667f5 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 { };