summary refs log tree commit diff
path: root/pkgs/development/python-modules/hass-nabucasa/default.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-06-19 10:52:29 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-06-19 11:05:52 +0100
commitdf65cd2ef978970d8f7b57792d65649c185ee98f (patch)
treebc852fb6fd53f44ce41b755f9c0e4c3b6210fd02 /pkgs/development/python-modules/hass-nabucasa/default.nix
parent25b91c2059b04268e70c5d73aac661f85bef48f6 (diff)
downloadnixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar.gz
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar.bz2
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar.lz
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar.xz
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.tar.zst
nixpkgs-df65cd2ef978970d8f7b57792d65649c185ee98f.zip
python3.pkgs.hass-nabucasa: fix build
Diffstat (limited to 'pkgs/development/python-modules/hass-nabucasa/default.nix')
-rw-r--r--pkgs/development/python-modules/hass-nabucasa/default.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/hass-nabucasa/default.nix b/pkgs/development/python-modules/hass-nabucasa/default.nix
index e13cae33960..2826056abcb 100644
--- a/pkgs/development/python-modules/hass-nabucasa/default.nix
+++ b/pkgs/development/python-modules/hass-nabucasa/default.nix
@@ -1,28 +1,40 @@
 { lib, buildPythonPackage, fetchFromGitHub, fetchpatch
 , acme, aiohttp, snitun, attrs, pycognito, warrant
-, pytest-aiohttp, asynctest, pytest  }:
+, pytest-aiohttp, asynctest, atomicwrites, pytest, pythonOlder }:
 
 buildPythonPackage rec {
   pname = "hass-nabucasa";
-  version = "0.32.2";
+  version = "0.34.6";
 
   src = fetchFromGitHub {
     owner = "nabucasa";
     repo = pname;
     rev = version;
-    sha256 = "1hfi5q222kgbgrj5yvr4lbhca49hcs6sc2yhxc4pjxqsc12bv1f1";
+    sha256 = "1lkqwj58qr0vn7zf5mhrhaz973ahj9wjp4mgzvyja1gcdh6amv34";
   };
 
-  # upstreamed in https://github.com/NabuCasa/hass-nabucasa/pull/119
   postPatch = ''
-    sed -i 's/"acme.*/"acme>=0.40.0,<2.0"/' setup.py
-    cat setup.py
+    sed -i 's/"acme.*"/"acme"/' setup.py
   '';
 
-  propagatedBuildInputs = [ acme aiohttp snitun attrs warrant pycognito ];
+  patches = [
+    # relax pytz dependency
+    (fetchpatch {
+      url = "https://github.com/NabuCasa/hass-nabucasa/commit/419e80feddc36c68384c032feda0057515b53eaa.patch";
+      sha256 = "14dgwci8615cwcf27hg7b42s7da50xhyjys3yx446q7ipk8zw4x6";
+    })
+  ];
+
+  propagatedBuildInputs = [
+    acme aiohttp atomicwrites snitun attrs warrant pycognito
+  ];
 
   checkInputs = [ pytest pytest-aiohttp asynctest ];
 
+  # Asynctest's mocking is broken with python3.8
+  # https://github.com/Martiusweb/asynctest/issues/132
+  doCheck = pythonOlder "3.8";
+
   checkPhase = ''
     pytest tests/
   '';