1{ lib 2, buildPythonPackage 3, isPy27 4, fetchPypi 5, progress 6, pyserial 7, pytest 8, mock 9}: 10 11buildPythonPackage rec { 12 pname = "stm32loader"; 13 version = "0.5.1"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "0135qzxlrivvkq6wgkw7shfz94n755qs2c1754p1hc2jk0nqayrg"; 18 }; 19 20 propagatedBuildInputs = [ progress pyserial ]; 21 22 checkInputs = [ pytest ] ++ lib.optional isPy27 mock; 23 24 checkPhase = '' 25 pytest --strict tests/unit 26 ''; 27 28 meta = with lib; { 29 description = "Flash firmware to STM32 microcontrollers in Python"; 30 homepage = "https://github.com/florisla/stm32loader"; 31 changelog = "https://github.com/florisla/stm32loader/blob/v${version}/CHANGELOG.md"; 32 license = licenses.gpl3; 33 maintainers = with maintainers; [ emily ]; 34 }; 35}