esptool_3: init at 3.3.2
This commit is contained in:
parent
4884ac1308
commit
df6b943ad0
63
pkgs/tools/misc/esptool/3.nix
Normal file
63
pkgs/tools/misc/esptool/3.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ lib, fetchFromGitHub, python3, openssl }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "esptool";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "espressif";
|
||||
repo = "esptool";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hpPL9KNPA+S57SJoKnQewBCOybDbKep0t5RKw9a9GjM=";
|
||||
};
|
||||
|
||||
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,
|
||||
# use patchPythonScript directly.
|
||||
dontWrapPythonPrograms = true;
|
||||
postFixup = ''
|
||||
buildPythonPath "$out $pythonPath"
|
||||
for f in $out/bin/*.py; do
|
||||
echo "Patching $f"
|
||||
patchPythonScript "$f"
|
||||
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";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -3987,6 +3987,8 @@ with pkgs;
|
|||
|
||||
esptool = callPackage ../tools/misc/esptool { };
|
||||
|
||||
esptool_3 = callPackage ../tools/misc/esptool/3.nix { };
|
||||
|
||||
esptool-ck = callPackage ../tools/misc/esptool-ck { };
|
||||
|
||||
ephemeralpg = callPackage ../development/tools/database/ephemeralpg {};
|
||||
|
|
Loading…
Reference in a new issue