summary refs log tree commit diff
path: root/pkgs/tools/misc/esptool
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2022-11-28 14:19:29 -0800
committerRobert Schütz <github@dotlambda.de>2022-12-11 13:26:22 -0800
commitf963d5e2d2db8e117af97e349435b1977320546b (patch)
treed7c7b0bd677cae217f990a4774b0030c0e73556e /pkgs/tools/misc/esptool
parent621ec5b398a72d389aea98400618f1a44f3a1209 (diff)
downloadnixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar.gz
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar.bz2
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar.lz
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar.xz
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.tar.zst
nixpkgs-f963d5e2d2db8e117af97e349435b1977320546b.zip
esptool_3: compatibility with bitstring 4
Diffstat (limited to 'pkgs/tools/misc/esptool')
-rw-r--r--pkgs/tools/misc/esptool/3.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/misc/esptool/3.nix b/pkgs/tools/misc/esptool/3.nix
index 3ffa79b8c8b..cc6744b274f 100644
--- a/pkgs/tools/misc/esptool/3.nix
+++ b/pkgs/tools/misc/esptool/3.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub, python3, openssl }:
+{ lib, fetchFromGitHub, fetchpatch, python3, openssl }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "esptool";
@@ -11,6 +11,16 @@ python3.pkgs.buildPythonApplication rec {
     hash = "sha256-hpPL9KNPA+S57SJoKnQewBCOybDbKep0t5RKw9a9GjM=";
   };
 
+  patches = [
+    # https://github.com/espressif/esptool/pull/802
+    (fetchpatch {
+      name = "bitstring-4-compatibility.patch";
+      url = "https://github.com/espressif/esptool/commit/16fa58415be2a7ff059ece40d4545288565d0a23.patch";
+      hash = "sha256-FYa9EvyET4P8VkdyMzJBkdxVYm0tFt2GPnfsjzBnevE=";
+      excludes = [ "setup.py" ];
+    })
+  ];
+
   postPatch = ''
     substituteInPlace test/test_imagegen.py \
       --replace "sys.executable, ESPTOOL_PY" "ESPTOOL_PY"