1 { lib, fetchFromGitHub, python3, openssl }:
3 python3.pkgs.buildPythonApplication rec {
7 src = fetchFromGitHub {
11 hash = "sha256-9WmiLji7Zoad5WIzgkpvkI9t96sfdkCtFh6zqVxF7qo=";
15 substituteInPlace test/test_imagegen.py \
16 --replace "sys.executable, ESPTOOL_PY" "ESPTOOL_PY"
19 propagatedBuildInputs = with python3.pkgs; [
27 # wrapPythonPrograms will overwrite esptool.py with a bash script,
28 # but espefuse.py tries to import it. Since we don't add any binary paths,
29 # use patchPythonScript directly.
30 dontWrapPythonPrograms = true;
32 buildPythonPath "$out $pythonPath"
33 for f in $out/bin/*.py; do
35 patchPythonScript "$f"
39 checkInputs = with python3.pkgs; [
43 # tests mentioned in `.github/workflows/test_esptool.yml`
47 export ESPTOOL_PY=$out/bin/esptool.py
48 ${python3.interpreter} test/test_imagegen.py
49 ${python3.interpreter} test/test_espsecure.py
50 ${python3.interpreter} test/test_merge_bin.py
51 ${python3.interpreter} test/test_modules.py
57 description = "ESP8266 and ESP32 serial bootloader utility";
58 homepage = "https://github.com/espressif/esptool";
59 license = licenses.gpl2Plus;
60 maintainers = with maintainers; [ dezgeg dotlambda ] ++ teams.lumiguide.members;
61 platforms = platforms.linux;