@@ -1,12 +1,14 @@
1−{ lib, buildPythonPackage, fetchPypi, attrs, protobuf, zeroconf }:
1+{ lib, buildPythonPackage, fetchPypi, isPy3k, attrs, protobuf, zeroconf }:
22
33buildPythonPackage rec {
44 pname = "aioesphomeapi";
5− version = "1.8.0";
5+ version = "2.0.1";
6+
7+ disabled = !isPy3k;
68
79 src = fetchPypi {
810 inherit pname version;
9− sha256 = "16ywa7yggmsx8m2r9azdq7w9fxjh736g1vd1aibgh24g7srhwwhj";
11+ sha256 = "db09e34dfc148279f303481c7da94b84c9b1442a41794f039c31253e81a58ffb";
1012 };
1113
1214 propagatedBuildInputs = [ attrs protobuf zeroconf ];
@@ -19,5 +21,9 @@ buildPythonPackage rec {
1921 homepage = https://github.com/esphome/aioesphomeapi;
2022 license = licenses.mit;
2123 maintainers = with maintainers; [ dotlambda ];
24+
25+ # Home Assistant should pin protobuf to the correct version. Can be tested using
26+ # nix-build -E "with import ./. {}; home-assistant.override { extraPackages = ps: [ ps.aioesphomeapi ]; }"
27+ broken = !lib.hasPrefix "3.6.1" protobuf.version;
2228 };
2329}