about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/mc/mcuboot-imgtool/package.nix
blob: 812c07f8346331713b5c8b6f1ea44de9636cf20c (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
{ lib
, fetchPypi
, python3Packages
, nix-update-script
}:

python3Packages.buildPythonApplication rec {
  pname = "mfgtool-imgtool";
  version = "2.0.0";
  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "imgtool";
    hash = "sha256-elQSVeae7B8Sqjjc4fHU/iDYISZ3xoqbbsY0ypGgZhI=";
  };

  passthru.updateScript = nix-update-script { };

  nativeBuildInputs = with python3Packages; [
    setuptools
  ];

  propagatedBuildInputs = with python3Packages; [
    cbor2
    click
    cryptography
    intelhex
  ];

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