From d10118ab7d1cd53b77a6ed043e13e915a424cfa9 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 30 Oct 2023 17:40:27 -0300 Subject: [PATCH] mcuboot-imgtool: init at 1.10.0 Signed-off-by: Otavio Salvador --- pkgs/by-name/mc/mcuboot-imgtool/package.nix | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/by-name/mc/mcuboot-imgtool/package.nix diff --git a/pkgs/by-name/mc/mcuboot-imgtool/package.nix b/pkgs/by-name/mc/mcuboot-imgtool/package.nix new file mode 100644 index 000000000000..3e618c47c486 --- /dev/null +++ b/pkgs/by-name/mc/mcuboot-imgtool/package.nix @@ -0,0 +1,38 @@ +{ lib +, fetchPypi +, python3Packages +, nix-update-script +}: + +python3Packages.buildPythonApplication rec { + pname = "mfgtool-imgtool"; + version = "1.10.0"; + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "imgtool"; + hash = "sha256-A7NOdZNKw9lufEK2vK8Rzq9PRT98bybBfXJr0YMQS0A="; + }; + + 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"; + }; +}