summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2020-12-22 20:38:08 +0000
committerGitHub <noreply@github.com>2020-12-22 20:38:08 +0000
commitaebe77d84f08d2453732f04e22db1c78a7453c81 (patch)
tree0fed25181630b036d425662c56d1ab7df74f0f65
parent0312504c2ecce271308c0ffcd88d7a14655caa66 (diff)
parent9a9ad8c78b77aded99d0b652368bea177c297da4 (diff)
Merge pull request #107389 from LumiGuide/esptool
esptool: 2.7 -> 3.0, fix #82965
-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 465e30e76157..d1d6bc1cb101 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";