about summary refs log tree commit diff
path: root/pkgs/tools/misc/esphome/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/esphome/default.nix')
-rw-r--r--pkgs/tools/misc/esphome/default.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix
index 54664196d2c3..2eea4ec1314a 100644
--- a/pkgs/tools/misc/esphome/default.nix
+++ b/pkgs/tools/misc/esphome/default.nix
@@ -21,19 +21,22 @@ let
 in
 python.pkgs.buildPythonApplication rec {
   pname = "esphome";
-  version = "2024.9.0";
+  version = "2024.10.3";
   pyproject = true;
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "refs/tags/${version}";
-    hash = "sha256-K28H2kbfiebJfW31CF3M+Vi823wFPWNk6qLPlSaljkk=";
+    hash = "sha256-13hNX9uaQbO/IKUkGaOITKh+REqUCHirbTPRgomzHBU=";
   };
 
-  nativeBuildInputs = with python.pkgs; [
+  build-systems = with python.pkgs; [
     setuptools
     argcomplete
+  ];
+
+  nativeBuildInputs = [
     installShellFiles
   ];
 
@@ -46,7 +49,8 @@ python.pkgs.buildPythonApplication rec {
 
   postPatch = ''
     substituteInPlace pyproject.toml \
-      --replace-fail "setuptools==" "setuptools>="
+      --replace-fail "setuptools==" "setuptools>=" \
+      --replace-fail "wheel~=" "wheel>="
 
     # ensure component dependencies are available
     cat requirements_optional.txt >> requirements.txt
@@ -56,7 +60,7 @@ python.pkgs.buildPythonApplication rec {
   '';
 
   # Remove esptool and platformio from requirements
-  ESPHOME_USE_SUBPROCESS = "";
+  env.ESPHOME_USE_SUBPROCESS = "";
 
   # esphome has optional dependencies it does not declare, they are
   # loaded when certain config blocks are used, like `font`, `image`
@@ -64,7 +68,7 @@ python.pkgs.buildPythonApplication rec {
   # They have validation functions like:
   # - validate_cryptography_installed
   # - validate_pillow_installed
-  propagatedBuildInputs = with python.pkgs; [
+  dependencies = with python.pkgs; [
     aioesphomeapi
     argcomplete
     cairosvg
@@ -79,9 +83,9 @@ python.pkgs.buildPythonApplication rec {
     pillow
     platformio
     protobuf
+    puremagic
     pyparsing
     pyserial
-    python-magic
     pyyaml
     requests
     ruamel-yaml
@@ -97,8 +101,8 @@ python.pkgs.buildPythonApplication rec {
     # git is used in esphome/writer.py
     # inetutils is used in esphome/dashboard/status/ping.py
     "--prefix PATH : ${lib.makeBinPath [ platformio esptool git inetutils ]}"
-    "--prefix PYTHONPATH : ${python.pkgs.makePythonPath propagatedBuildInputs}" # will show better error messages
-    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
+    "--prefix PYTHONPATH : ${python.pkgs.makePythonPath dependencies}" # will show better error messages
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc ]}"
     "--set ESPHOME_USE_SUBPROCESS ''"
   ];