4d5a95770c
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, python3
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "esptool";
|
|
version = "4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "espressif";
|
|
repo = "esptool";
|
|
rev = "v${version}";
|
|
hash = "sha256-SwMdemCk3e3RyXTzoXIqDRywpg3ogE9nQjXGBz0BjwE=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
bitstring
|
|
cryptography
|
|
ecdsa
|
|
pyserial
|
|
reedsolo
|
|
];
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
pyelftools
|
|
pytestCheckHook
|
|
];
|
|
|
|
# tests mentioned in `.github/workflows/test_esptool.yml`
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
pytest test/test_imagegen.py
|
|
pytest test/test_espsecure.py
|
|
pytest test/test_merge_bin.py
|
|
pytest test/test_image_info.py
|
|
pytest 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; [ dezgeg dotlambda ] ++ teams.lumiguide.members;
|
|
platforms = with platforms; linux ++ darwin;
|
|
};
|
|
}
|