From 6000c3c94cc92c1570f52fe61406a295fc11ef39 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 16 Dec 2023 03:00:35 +0100 Subject: [PATCH] esphome: use pep517 build, upgrade esptool to 4.x --- pkgs/tools/misc/esphome/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix index 2b683e73ed0f..6e8c3a91e278 100644 --- a/pkgs/tools/misc/esphome/default.nix +++ b/pkgs/tools/misc/esphome/default.nix @@ -3,7 +3,7 @@ , python3Packages , fetchFromGitHub , platformio -, esptool_3 +, esptool , git }: @@ -17,7 +17,7 @@ in python.pkgs.buildPythonApplication rec { pname = "esphome"; version = "2023.11.6"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = pname; @@ -26,6 +26,10 @@ python.pkgs.buildPythonApplication rec { hash = "sha256-9LqZlhCt+7p6tnSHFhbnUzkEOJQDsg/Pd/hgd/Il0ZQ="; }; + nativeBuildInputs = with python.pkgs; [ + setuptools + ]; + postPatch = '' # remove all version pinning (E.g tornado==5.1.1 -> tornado) sed -i -e "s/==[0-9.]*//" requirements.txt @@ -70,7 +74,7 @@ python.pkgs.buildPythonApplication rec { # platformio is used in esphomeyaml/platformio_api.py # esptool is used in esphomeyaml/__main__.py # git is used in esphomeyaml/writer.py - "--prefix PATH : ${lib.makeBinPath [ platformio esptool_3 git ]}" + "--prefix PATH : ${lib.makeBinPath [ platformio esptool git ]}" "--set ESPHOME_USE_SUBPROCESS ''" ];