From 44575c512836d2098d223672071d1ae4c37a74e4 Mon Sep 17 00:00:00 2001 From: shimun Date: Sun, 8 Dec 2024 18:34:41 +0100 Subject: [PATCH] bmputil: added --- pkgs/by-name/bm/bmputil/50-blackmagic.conf | 1 + pkgs/by-name/bm/bmputil/package.nix | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/by-name/bm/bmputil/50-blackmagic.conf create mode 100644 pkgs/by-name/bm/bmputil/package.nix diff --git a/pkgs/by-name/bm/bmputil/50-blackmagic.conf b/pkgs/by-name/bm/bmputil/50-blackmagic.conf new file mode 100644 index 0000000000000..79fc876001207 --- /dev/null +++ b/pkgs/by-name/bm/bmputil/50-blackmagic.conf @@ -0,0 +1 @@ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6018", GROUP="plugdev", MODE="0666" diff --git a/pkgs/by-name/bm/bmputil/package.nix b/pkgs/by-name/bm/bmputil/package.nix new file mode 100644 index 0000000000000..af4fe8520101d --- /dev/null +++ b/pkgs/by-name/bm/bmputil/package.nix @@ -0,0 +1,28 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, +}: +rustPlatform.buildRustPackage rec { + pname = "bmputil"; + version = "0.1.3"; + + src = fetchFromGitHub { + owner = "blackmagic-debug"; + repo = pname; + rev = "v" + version; + hash = "sha256-LKtdwQbsPNEu3EDTowOXeFmi5OHOU3kq5f5xxevBjtM="; + }; + cargoLock.lockFile = src + "/Cargo.lock"; + postInstall = '' + mkdir -p $out/lib/udev + install -m 444 ${./.}/50-blackmagic.conf $out/lib/udev/ + ''; + + meta = { + description = "Black Magic Probe Firmware Manager"; + homepage = "https://github.com/blackmagic-debug/bmputil"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.shimun ]; + }; +}