about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2019-04-23 23:13:21 +0000
committerGitHub <noreply@github.com>2019-04-23 23:13:21 +0000
commitfa6ff572d33e9d5a7ec37d1dddacb032ef348268 (patch)
tree2d5ac243db0c54ab8bf3188e86ed981cd4771c18
parentafe0d73e0939e99baff80dc8b9af4aa939f617c1 (diff)
parent59b1cdba311f8563bc954d9b8b164d4a54e8456a (diff)
Merge pull request #60064 from dotlambda/aioesphomeapi-2.0.1
python3.pkgs.aioesphomeapi: 1.8.0 -> 2.0.1
-rw-r--r--pkgs/development/python-modules/aioesphomeapi/default.nix12
-rw-r--r--pkgs/servers/home-assistant/default.nix9
2 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix
index 80c85a2614cad..0afb1c432d6b1 100644
--- a/pkgs/development/python-modules/aioesphomeapi/default.nix
+++ b/pkgs/development/python-modules/aioesphomeapi/default.nix
@@ -1,12 +1,14 @@
-{ lib, buildPythonPackage, fetchPypi, attrs, protobuf, zeroconf }:
+{ lib, buildPythonPackage, fetchPypi, isPy3k, attrs, protobuf, zeroconf }:
 
 buildPythonPackage rec {
   pname = "aioesphomeapi";
-  version = "1.8.0";
+  version = "2.0.1";
+
+  disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "16ywa7yggmsx8m2r9azdq7w9fxjh736g1vd1aibgh24g7srhwwhj";
+    sha256 = "db09e34dfc148279f303481c7da94b84c9b1442a41794f039c31253e81a58ffb";
   };
 
   propagatedBuildInputs = [ attrs protobuf zeroconf ];
@@ -19,5 +21,9 @@ buildPythonPackage rec {
     homepage = https://github.com/esphome/aioesphomeapi;
     license = licenses.mit;
     maintainers = with maintainers; [ dotlambda ];
+
+    # Home Assistant should pin protobuf to the correct version. Can be tested using
+    #     nix-build -E "with import ./. {}; home-assistant.override { extraPackages = ps: [ ps.aioesphomeapi ]; }"
+    broken = !lib.hasPrefix "3.6.1" protobuf.version;
   };
 }
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 112c1f57a91ab..d2eb536a11e50 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub, fetchpatch, python3
+{ lib, fetchFromGitHub, fetchpatch, python3, protobuf3_6
 
 # Look up dependencies of specified components in component-packages.nix
 , extraComponents ? []
@@ -78,6 +78,13 @@ let
       });
     })
 
+    # required by aioesphomeapi
+    (self: super: {
+      protobuf = super.protobuf.override {
+        protobuf = protobuf3_6;
+      };
+    })
+
     # hass-frontend does not exist in python3.pkgs
     (self: super: {
       hass-frontend = self.callPackage ./frontend.nix { };