Fix esphome so that it can build again

This commit is contained in:
Zuckerberg 2024-05-26 17:19:48 -06:00
parent b482a8c106
commit a785890990
2 changed files with 20 additions and 0 deletions

View File

@ -83,6 +83,7 @@
src = nixpkgs;
patches = [
./patches/gamepadui.patch
./patches/esphome.patch
inputs.nixpkgs-xone-fix
];
};

19
patches/esphome.patch Normal file
View File

@ -0,0 +1,19 @@
diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix
index a8ab91f8f329..81bf135a023f 100644
--- a/pkgs/tools/misc/esphome/default.nix
+++ b/pkgs/tools/misc/esphome/default.nix
@@ -5,6 +5,7 @@
, platformio
, esptool
, git
+, stdenv
}:
let
@@ -76,6 +77,7 @@ python.pkgs.buildPythonApplication rec {
# git is used in esphomeyaml/writer.py
"--prefix PATH : ${lib.makeBinPath [ platformio esptool git ]}"
"--prefix PYTHONPATH : $PYTHONPATH" # will show better error messages
+ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
"--set ESPHOME_USE_SUBPROCESS ''"
];