git.iko.soy/typeable/nixpkgs
on master help sign in
python3.pkgs.aioesphomeapi: 1.8.0 -> 2.0.1

Pin the protobuf version used by Home Assistant to the version required by aioesphomeapi and some components.

commit59b1cdba311f8563bc954d9b8b164d4a54e8456a authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de> dateMon 22 Apr 2019, 23:35 (8 years ago) parent076be09
2 files changed+17−4
pkgs/development/python-modules/aioesphomeapi/default.nix+9−3 pkgs/servers/home-assistant/default.nix+8−1
pkgs/development/python-modules/aioesphomeapi/default.nix+9−3
@@ -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}
pkgs/servers/home-assistant/default.nix+8−1
@@ -1,4 +1,4 @@
1−{ lib, fetchFromGitHub, fetchpatch, python3
1+{ lib, fetchFromGitHub, fetchpatch, python3, protobuf3_6
22
33# Look up dependencies of specified components in component-packages.nix
44, extraComponents ? []
@@ -78,6 +78,13 @@ let
7878 });
7979 })
8080
81+ # required by aioesphomeapi
82+ (self: super: {
83+ protobuf = super.protobuf.override {
84+ protobuf = protobuf3_6;
85+ };
86+ })
87+
8188 # hass-frontend does not exist in python3.pkgs
8289 (self: super: {
8390 hass-frontend = self.callPackage ./frontend.nix { };