diff options
author | Robert Schütz <nix@dotlambda.de> | 2022-05-12 08:41:03 +0000 |
---|---|---|
committer | Robert Schütz <nix@dotlambda.de> | 2022-05-12 09:27:21 +0000 |
commit | 70030a7ff3d5f46a57b52ac223f0aea23543072f (patch) | |
tree | a7a563f7d000011554e75a67793c0447a049edbf | |
parent | 143aa3e88ca9250520d323083191bdc91fb79ad7 (diff) | |
download | nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar.gz nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar.bz2 nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar.lz nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar.xz nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.tar.zst nixpkgs-70030a7ff3d5f46a57b52ac223f0aea23543072f.zip |
esptool: 3.3 -> 3.3.1
https://github.com/espressif/esptool/releases/tag/v3.3.1
-rw-r--r-- | pkgs/tools/misc/esptool/default.nix | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/pkgs/tools/misc/esptool/default.nix b/pkgs/tools/misc/esptool/default.nix index e1ec37063de..b4439363d4a 100644 --- a/pkgs/tools/misc/esptool/default.nix +++ b/pkgs/tools/misc/esptool/default.nix @@ -2,19 +2,27 @@ python3.pkgs.buildPythonApplication rec { pname = "esptool"; - version = "3.3"; + version = "3.3.1"; src = fetchFromGitHub { owner = "espressif"; repo = "esptool"; rev = "v${version}"; - sha256 = "sha256-CmGie+M3AboOk8X+LkRhIxTRQZgDlklouzmz8kiIZuI="; + hash = "sha256-9WmiLji7Zoad5WIzgkpvkI9t96sfdkCtFh6zqVxF7qo="; }; - checkInputs = with python3.pkgs; - [ flake8 flake8-future-import flake8-import-order openssl ]; - propagatedBuildInputs = with python3.pkgs; - [ pyserial pyaes ecdsa reedsolo bitstring cryptography ]; + postPatch = '' + substituteInPlace test/test_imagegen.py \ + --replace "sys.executable, ESPTOOL_PY" "ESPTOOL_PY" + ''; + + propagatedBuildInputs = with python3.pkgs; [ + bitstring + cryptography + ecdsa + pyserial + reedsolo + ]; # wrapPythonPrograms will overwrite esptool.py with a bash script, # but espefuse.py tries to import it. Since we don't add any binary paths, @@ -28,6 +36,23 @@ python3.pkgs.buildPythonApplication rec { done ''; + checkInputs = with python3.pkgs; [ + pyelftools + ]; + + # tests mentioned in `.github/workflows/test_esptool.yml` + checkPhase = '' + runHook preCheck + + export ESPTOOL_PY=$out/bin/esptool.py + ${python3.interpreter} test/test_imagegen.py + ${python3.interpreter} test/test_espsecure.py + ${python3.interpreter} test/test_merge_bin.py + ${python3.interpreter} test/test_modules.py + + runHook postCheck + ''; + meta = with lib; { description = "ESP8266 and ESP32 serial bootloader utility"; homepage = "https://github.com/espressif/esptool"; |