depot/pkgs/development/embedded/elf2uf2-rs/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

33 lines
941 B
Nix

{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, udev, CoreFoundation, DiskArbitration, Foundation }:
rustPlatform.buildRustPackage rec {
pname = "elf2uf2-rs";
version = "2.0.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-cmiCOykORue0Cg2uUUWa/nXviX1ddbGNC5gRKe+1kYs=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optional stdenv.hostPlatform.isLinux udev
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreFoundation
DiskArbitration
Foundation
];
cargoHash = "sha256-TBH3pLB6vQVGnfShLtFPNKjciuUIuTkvp3Gayzo+X9E=";
meta = with lib; {
description = "Convert ELF files to UF2 for USB Flashing Bootloaders";
mainProgram = "elf2uf2-rs";
homepage = "https://github.com/JoNil/elf2uf2-rs";
license = with licenses; [ bsd0 ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ polygon moni ];
};
}