nixpkgs/pkgs/development/embedded/elf2uf2-rs/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

34 lines
917 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;
sha256 = "sha256-cmiCOykORue0Cg2uUUWa/nXviX1ddbGNC5gRKe+1kYs=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optional stdenv.isLinux udev
++ lib.optionals stdenv.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 ];
};
}