From 8b25590a258b79630c6019bc99a333bc0fff7922 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Thu, 8 Aug 2024 17:38:20 +0100 Subject: [PATCH] mtk_uartboot: init at 0.1.1 Co-authored-by: Yohann Boniface --- pkgs/by-name/mt/mtk_uartboot/package.nix | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkgs/by-name/mt/mtk_uartboot/package.nix diff --git a/pkgs/by-name/mt/mtk_uartboot/package.nix b/pkgs/by-name/mt/mtk_uartboot/package.nix new file mode 100644 index 0000000000000..34549bb688fa4 --- /dev/null +++ b/pkgs/by-name/mt/mtk_uartboot/package.nix @@ -0,0 +1,31 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + stdenv, + darwin, +}: + +rustPlatform.buildRustPackage rec { + pname = "mtk-uartboot"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "981213"; + repo = "mtk_uartboot"; + rev = "refs/v${version}"; + hash = "sha256-mwwm2TVBfOEqvQIP0Vl4Q2SkcZxX1JP7rShmjaY+pWE="; + }; + + cargoHash = "sha256-At+HkvHcn6kAkSxBqFlaxUTZ7Xuy2lARMFQ2i6uybSk="; + + buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; + + meta = with lib; { + description = "third-party tool to load and execute binaries over UART for Mediatek SoCs"; + homepage = "https://github.com/981213/mtk_uartboot"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ matthewcroughan ]; + mainProgram = "mtk_uartboot"; + }; +}