From c7743cd496fc1ccc76758276a3a9c0dbccaae8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Aug 2023 15:49:37 -0700 Subject: [PATCH] esptool: 4.5.1 -> 4.6.2 Diff: https://github.com/espressif/esptool/compare/v4.5.1...v4.6.2 --- pkgs/tools/misc/esptool/default.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/esptool/default.nix b/pkgs/tools/misc/esptool/default.nix index d7bf8a9b903..a06074b688d 100644 --- a/pkgs/tools/misc/esptool/default.nix +++ b/pkgs/tools/misc/esptool/default.nix @@ -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