2021-01-25 09:26:54 +01:00
|
|
|
{ lib, fetchFromGitHub, python3, openssl }:
|
2017-05-24 01:44:38 +02:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-07-18 01:16:57 +02:00
|
|
|
pname = "esptool";
|
2021-10-27 11:01:21 +02:00
|
|
|
version = "3.2";
|
2017-05-24 01:44:38 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "espressif";
|
|
|
|
repo = "esptool";
|
|
|
|
rev = "v${version}";
|
2021-10-27 11:01:21 +02:00
|
|
|
sha256 = "1jic5kynfan5zirv9pm3pfjps12zf68cpnhl7i1vls2m79zdkfa3";
|
2017-05-24 01:44:38 +02:00
|
|
|
};
|
|
|
|
|
2020-11-12 16:24:42 +01:00
|
|
|
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
|
|
|
|
'';
|
2017-05-24 01:44:38 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-05-24 01:44:38 +02:00
|
|
|
description = "ESP8266 and ESP32 serial bootloader utility";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/espressif/esptool";
|
2021-07-09 19:20:34 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2018-03-01 12:18:14 +01:00
|
|
|
maintainers = with maintainers; [ dezgeg dotlambda ];
|
2017-05-24 01:44:38 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|