summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2020-12-23 00:48:29 +0000
committerGitHub <noreply@github.com>2020-12-23 00:48:29 +0000
commit28fd8e0d598ad27ecece751827396ab765a6a34e (patch)
treec28cd15292529e434d2c7d5272371aa3c1b3e2a2 /pkgs/tools/misc
parente0d458ed2c77bfed6db792a5dd94392871cacc3f (diff)
parent00f6d352bd4598bdcd6b5c9884430e9e2d6084a6 (diff)
downloadnixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar.gz
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar.bz2
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar.lz
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar.xz
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.tar.zst
nixpkgs-28fd8e0d598ad27ecece751827396ab765a6a34e.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/esptool/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/tools/misc/esptool/default.nix b/pkgs/tools/misc/esptool/default.nix
index 465e30e7615..d1d6bc1cb10 100644
--- a/pkgs/tools/misc/esptool/default.nix
+++ b/pkgs/tools/misc/esptool/default.nix
@@ -2,17 +2,31 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "esptool";
-  version = "2.7";
+  version = "3.0";
 
   src = fetchFromGitHub {
     owner = "espressif";
     repo = "esptool";
     rev = "v${version}";
-    sha256 = "1p5hx0rhs986ffqz78rdxg7jayndsq632399xby39k17kvd3mb31";
+    sha256 = "1y022qlcdgdx5a88lkc3sqavklz494afbfyh100lp7xfk3f2mjln";
   };
 
-  checkInputs = with python3.pkgs; [ flake8 flake8-future-import flake8-import-order openssl ];
-  propagatedBuildInputs = with python3.pkgs; [ pyserial pyaes ecdsa ];
+  checkInputs = with python3.pkgs;
+    [ flake8 flake8-future-import flake8-import-order openssl ];
+  propagatedBuildInputs = with python3.pkgs;
+    [ pyserial pyaes ecdsa reedsolo bitstring cryptography ];
+
+  # wrapPythonPrograms will overwrite esptool.py with a bash script,
+  # but espefuse.py tries to import it. Since we don't add any binary paths,
+  # use patchPythonScript directly.
+  dontWrapPythonPrograms = true;
+  postFixup = ''
+    buildPythonPath "$out $pythonPath"
+    for f in $out/bin/*.py; do
+        echo "Patching $f"
+        patchPythonScript "$f"
+    done
+  '';
 
   meta = with stdenv.lib; {
     description = "ESP8266 and ESP32 serial bootloader utility";