From 70a86f1184dfcd5db45a57176a9ec41dfb3fe7b5 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sat, 2 Nov 2019 14:47:53 -0700 Subject: [PATCH] esphome: 1.13.6 -> 1.14.1 --- pkgs/servers/home-assistant/esphome.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pkgs/servers/home-assistant/esphome.nix b/pkgs/servers/home-assistant/esphome.nix index b5f6af3e483..27dabd2a2eb 100644 --- a/pkgs/servers/home-assistant/esphome.nix +++ b/pkgs/servers/home-assistant/esphome.nix @@ -1,4 +1,4 @@ -{ lib, python3, platformio, esptool, git, protobuf3_7, fetchpatch }: +{ lib, python3, platformio, esptool, git, protobuf3_10, fetchpatch }: let python = python3.override { @@ -11,24 +11,19 @@ let }; }); protobuf = super.protobuf.override { - protobuf = protobuf3_7; + protobuf = protobuf3_10; }; + }; }; in python.pkgs.buildPythonApplication rec { pname = "esphome"; - version = "1.13.6"; + version = "1.14.1"; src = python.pkgs.fetchPypi { inherit pname version; - sha256 = "53148fc43c6cc6736cb7aa4cc1189caa305812061f55289ff916f8bd731ac623"; - }; - - patches = fetchpatch { - url = https://github.com/esphome/esphome/pull/694.patch; - includes = [ "esphome/voluptuous_schema.py" ]; - sha256 = "0i2v1d6mcgc94i9rkaqmls7iyfbaisdji41sfc7bh7cf2j824im9"; + sha256 = "1hw1q2fck9429077w207rk65a1krzyi6qya5pzjkpw4av5s0v0g3"; }; ESPHOME_USE_SUBPROCESS = ""; @@ -36,8 +31,16 @@ in python.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python.pkgs; [ voluptuous pyyaml paho-mqtt colorlog tornado protobuf tzlocal pyserial ifaddr + protobuf ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "protobuf==3.10.0" "protobuf~=3.10" \ + --replace "paho-mqtt==1.4.0" "paho-mqtt~=1.4" \ + --replace "tornado==5.1.1" "tornado~=5.1" + ''; + makeWrapperArgs = [ # platformio is used in esphomeyaml/platformio_api.py # esptool is used in esphomeyaml/__main__.py