depot/third_party/nixpkgs/pkgs/tools/misc/esptool/default.nix
Default email 5557ff764c Project import generated by Copybara.
GitOrigin-RevId: 988cc958c57ce4350ec248d2d53087777f9e1949
2023-02-22 11:55:15 +01:00

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 = platforms.linux;
};
}