1{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, udev }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "elf2uf2-rs";
5 version = "1.3.7";
6
7 src = fetchCrate {
8 inherit pname version;
9 sha256 = "sha256-2ZilZIYXCNrKJlkHBsz/2/pMtF+UDfjDlt53ylcwgus=";
10 };
11
12 nativeBuildInputs = [
13 pkg-config
14 ];
15
16 buildInputs = [
17 udev
18 ];
19
20 cargoSha256 = "sha256-+3Rqlzkrw9XfM3PelGNbnRGaWQLbzVJ7iJgvGgVt5FE=";
21
22 meta = with lib; {
23 description = "Convert ELF files to UF2 for USB Flashing Bootloaders";
24 homepage = "https://github.com/JoNil/elf2uf2-rs";
25 license = with licenses; [ bsd0 ];
26 platforms = platforms.linux;
27 maintainers = with maintainers; [ polygon ];
28 };
29}