10 rustPlatform.buildRustPackage rec {
11 pname = "elf2nucleus";
14 src = fetchFromGitHub {
18 hash = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA=";
21 useFetchCargoVendor = true;
22 cargoHash = "sha256-Xw+heCEwQePyU2gElpG8PTIUZA7y+Onx+2AX2NZzDGs=";
24 nativeBuildInputs = [ installShellFiles ];
26 buildInputs = [ micronucleus ];
28 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
29 installShellCompletion --cmd elf2nucleus \
30 --bash <($out/bin/elf2nucleus --completions bash) \
31 --fish <($out/bin/elf2nucleus --completions fish) \
32 --zsh <($out/bin/elf2nucleus --completions zsh)
36 description = "Integrate micronucleus into the cargo buildsystem, flash an AVR firmware from an elf file";
37 mainProgram = "elf2nucleus";
38 homepage = "https://github.com/kpcyrd/elf2nucleus";
39 license = licenses.gpl3Plus;
40 maintainers = [ maintainers.marble ];