esphome: use pep517 build, upgrade esptool to 4.x

This commit is contained in:
Martin Weinelt
2023-12-16 08:27:46 +01:00
committed by Jörg Thalheim
parent 6f2ef6811e
commit 6000c3c94c
+7 -3
View File
@@ -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 ''"
];