summary refs log tree commit diff
path: root/pkgs/development/python-modules/zigpy-zigate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/zigpy-zigate/default.nix')
-rw-r--r--pkgs/development/python-modules/zigpy-zigate/default.nix46
1 files changed, 34 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/zigpy-zigate/default.nix b/pkgs/development/python-modules/zigpy-zigate/default.nix
index 43f291841ff..a906ff4f419 100644
--- a/pkgs/development/python-modules/zigpy-zigate/default.nix
+++ b/pkgs/development/python-modules/zigpy-zigate/default.nix
@@ -1,22 +1,44 @@
-{ stdenv, buildPythonPackage, fetchPypi
-, pyserial, pyserial-asyncio, zigpy
-, pytest }:
+{ lib
+, asynctest
+, buildPythonPackage
+, fetchFromGitHub
+, pyserial
+, pyserial-asyncio
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, zigpy }:
 
 buildPythonPackage rec {
   pname = "zigpy-zigate";
-  version = "0.6.1";
+  version = "0.6.2";
+  # https://github.com/Martiusweb/asynctest/issues/152
+  # broken by upstream python bug with asynctest and
+  # is used exclusively by home-assistant with python 3.8
+  disabled = pythonOlder "3.8";
 
-  buildInputs = [ pyserial pyserial-asyncio zigpy ];
-  checkInputs = [ pytest ];
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0xxqv65drrr96b9ncwsx9ayd369lpwimj1jjb0d7j6l9lil0wmf5";
+  src = fetchFromGitHub {
+    owner = "zigpy";
+    repo = "zigpy-zigate";
+    rev = version;
+    sha256 = "EV6DV+BytUcPMtzYVKDnq/Uv2efg3stjL5uVlL62II4=";
   };
 
-  meta = with stdenv.lib; {
+  buildInputs = [
+    pyserial
+    pyserial-asyncio
+    zigpy
+  ];
+
+  checkInputs = [
+    asynctest
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
     description = "A library which communicates with ZiGate radios for zigpy";
-    homepage = "http://github.com/doudz/zigpy-zigate";
+    homepage = "https://github.com/zigpy/zigpy-zigate";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ etu mvnetbiz ];
     platforms = platforms.linux;