summary refs log tree commit diff
path: root/pkgs/by-name/mc/mcuboot-imgtool/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/mc/mcuboot-imgtool/package.nix')
-rw-r--r--pkgs/by-name/mc/mcuboot-imgtool/package.nix38
1 files changed, 38 insertions, 0 deletions
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 00000000000..812c07f8346
--- /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 = "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";
+  };
+}