esptool: 4.5.1 -> 4.6.2

Diff: https://github.com/espressif/esptool/compare/v4.5.1...v4.6.2
This commit is contained in:
Robert Schütz 2023-08-15 15:49:37 -07:00
parent ed75ab352f
commit c7743cd496

View file

@ -1,38 +1,56 @@
{ lib
, fetchFromGitHub
, python3
, softhsm
}:
python3.pkgs.buildPythonApplication rec {
pname = "esptool";
version = "4.5.1";
version = "4.6.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "espressif";
repo = "esptool";
rev = "v${version}";
hash = "sha256-FKFw7czXzC8F3OXjlLoJEFaqsSgqWz0ZEqd7KjCy5Ik=";
hash = "sha256-3uvTyJrGCpulu/MR/VfCgnIxibxJj2ehBIBSveq7EfI=";
};
postPatch = ''
patchShebangs ci
substituteInPlace test/test_espsecure_hsm.py \
--replace "/usr/lib/softhsm" "${lib.getLib softhsm}/lib/softhsm"
'';
propagatedBuildInputs = with python3.pkgs; [
bitstring
cryptography
ecdsa
pyserial
reedsolo
pyyaml
python-pkcs11
];
nativeCheckInputs = with python3.pkgs; [
pyelftools
pytestCheckHook
softhsm
];
# tests mentioned in `.github/workflows/test_esptool.yml`
checkPhase = ''
runHook preCheck
export SOFTHSM2_CONF=$(mktemp)
echo "directories.tokendir = $(mktemp -d)" > "$SOFTHSM2_CONF"
./ci/setup_softhsm2.sh
pytest test/test_imagegen.py
pytest test/test_espsecure.py
pytest test/test_espsecure_hsm.py
pytest test/test_merge_bin.py
pytest test/test_image_info.py
pytest test/test_modules.py