Commit 6000c3c9 authored by Martin Weinelt's avatar Martin Weinelt Committed by Jörg Thalheim
Browse files

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

parent 6f2ef681
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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 ''"
  ];