about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/homematicip/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/homematicip/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/homematicip/default.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/homematicip/default.nix b/nixpkgs/pkgs/development/python-modules/homematicip/default.nix
index e6759f498a32..fb10dc516831 100644
--- a/nixpkgs/pkgs/development/python-modules/homematicip/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/homematicip/default.nix
@@ -5,6 +5,7 @@
 , async-timeout
 , buildPythonPackage
 , fetchFromGitHub
+, fetchpatch
 , pytestCheckHook
 , pythonOlder
 , pytest-aiohttp
@@ -17,6 +18,8 @@
 buildPythonPackage rec {
   pname = "homematicip";
   version = "1.0.1";
+  format = "setuptools";
+
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
@@ -26,6 +29,15 @@ buildPythonPackage rec {
     sha256 = "008snxx9ijpi1zr1pi1v4a6g74j821hyw0khs9lmi08v2mcabm36";
   };
 
+  patches = [
+    (fetchpatch {
+      # Drop loop kwarg from async_timeout.timeout
+      # https://github.com/coreGreenberet/homematicip-rest-api/pull/424
+      url = "https://github.com/coreGreenberet/homematicip-rest-api/commit/90efb335667e3d462b7f9ef113d2e0b8bb4e96b4.patch";
+      sha256 = "0f2bbs0666mf6sc7p4n8fwh29yjilkq36qf5pn0waf6iqdzxqwih";
+    })
+  ];
+
   propagatedBuildInputs = [
     aenum
     aiohttp
@@ -42,6 +54,11 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  postPatch = ''
+    substituteInPlace homematicip/aio/connection.py \
+      --replace ", loop=self._loop" ""
+  '';
+
   disabledTests = [
     # Assert issues with datetime
     "test_contact_interface_device"
@@ -67,7 +84,9 @@ buildPythonPackage rec {
     "test_websocket"
   ];
 
-  pythonImportsCheck = [ "homematicip" ];
+  pythonImportsCheck = [
+    "homematicip"
+  ];
 
   meta = with lib; {
     description = "Python module for the homematicIP REST API";