about summary refs log tree commit diff
path: root/pkgs/development/python-modules/imgtool/default.nix
blob: ba083666336f5d40a1e8243dc374d5983f2fbbfb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pythonOlder,
  setuptools,
  cbor2,
  click,
  cryptography,
  intelhex,
  pyyaml,
}:

buildPythonPackage rec {
  pname = "imgtool";
  version = "2.1.0";
  pyproject = true;

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-T3+831PETqqmImUEUQzLUvfvAMmXUDz5STSzMMlge2A=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    cbor2
    click
    cryptography
    intelhex
    pyyaml
  ];

  pythonImportsCheck = [ "imgtool" ];

  meta = with lib; {
    description = "MCUboot's image signing and key management";
    mainProgram = "imgtool";
    homepage = "https://github.com/mcu-tools/mcuboot";
    license = licenses.asl20;
    maintainers = with maintainers; [ samueltardieu ];
  };
}