77
88python3Packages . buildPythonApplication rec {
99 pname = "esptool" ;
10- version = "4.9.0 " ;
10+ version = "5.0.2 " ;
1111 pyproject = true ;
1212
1313 src = fetchFromGitHub {
1414 owner = "espressif" ;
1515 repo = "esptool" ;
1616 tag = "v${ version } " ;
17- hash = "sha256-iIFjInqiqjeqiDYL7BU3vT99pCVnu8OhU7u9uKwe/SI =" ;
17+ hash = "sha256-oRvtEBp88tmgjjIuoQS5ySm4I0aD/Zs8VLRUZo0sh/I =" ;
1818 } ;
1919
2020 postPatch = ''
@@ -29,14 +29,14 @@ python3Packages.buildPythonApplication rec {
2929 ] ;
3030
3131 dependencies = with python3Packages ; [
32- argcomplete
3332 bitstring
33+ click
3434 cryptography
35- ecdsa
3635 intelhex
3736 pyserial
38- reedsolo
3937 pyyaml
38+ reedsolo
39+ rich-click
4040 ] ;
4141
4242 optional-dependencies = with python3Packages ; {
@@ -48,39 +48,39 @@ python3Packages.buildPythonApplication rec {
4848 [
4949 pyelftools
5050 pytestCheckHook
51+ requests
5152 softhsm
5253 ]
5354 ++ lib . flatten ( lib . attrValues optional-dependencies ) ;
5455
55- # tests mentioned in `.github/workflows/test_esptool.yml`
56- checkPhase = ''
57- runHook preCheck
56+ preCheck = ''
57+ export PATH="$out/bin:$PATH"
58+ '' ;
59+
60+ pytestFlags = [
61+ "-m"
62+ "host_test"
63+ ] ;
5864
65+ postCheck = ''
5966 export SOFTHSM2_CONF=$(mktemp)
6067 echo "directories.tokendir = $(mktemp -d)" > "$SOFTHSM2_CONF"
6168 ./ci/setup_softhsm2.sh
6269
63- pytest test/test_imagegen.py
64- pytest test/test_espsecure.py
6570 pytest test/test_espsecure_hsm.py
66- pytest test/test_merge_bin.py
67- pytest test/test_image_info.py
68- pytest test/test_modules.py
69-
70- runHook postCheck
7171 '' ;
7272
73- meta = with lib ; {
73+ meta = {
7474 changelog = "https://github.com/espressif/esptool/blob/${ src . tag } /CHANGELOG.md" ;
7575 description = "ESP8266 and ESP32 serial bootloader utility" ;
7676 homepage = "https://github.com/espressif/esptool" ;
77- license = licenses . gpl2Plus ;
78- maintainers = with maintainers ; [
77+ license = lib . licenses . gpl2Plus ;
78+ maintainers = with lib . maintainers ; [
7979 dezgeg
8080 dotlambda
8181 ] ;
8282 teams = [ lib . teams . lumiguide ] ;
83- platforms = with platforms ; linux ++ darwin ;
84- mainProgram = "esptool.py " ;
83+ platforms = with lib . platforms ; linux ++ darwin ;
84+ mainProgram = "esptool" ;
8585 } ;
8686}
0 commit comments