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.0";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "1w6jg4dcyz6si6dcyx727sxi75wnl0j89xkiwqmsw286s1y8ijjw";
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}