nixpkgs/pkgs/by-name/el/elf2nucleus/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
Nix
Raw Normal View History

2024-01-07 20:46:36 +00:00
{
installShellFiles,
fetchFromGitHub,
lib,
micronucleus,
rustPlatform,
stdenv,
2024-01-07 20:46:36 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "elf2nucleus";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kpcyrd";
repo = pname;
rev = "v${version}";
hash = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA=";
2024-01-07 20:46:36 +00:00
};
cargoHash = "sha256-IeQnI6WTzxSI/VzoHtVukZtB1jX98wzLOT01NMLD5wQ=";
2024-01-07 20:46:36 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ micronucleus ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2024-01-07 20:46:36 +00:00
installShellCompletion --cmd elf2nucleus \
--bash <($out/bin/elf2nucleus --completions bash) \
--fish <($out/bin/elf2nucleus --completions fish) \
--zsh <($out/bin/elf2nucleus --completions zsh)
'';
meta = with lib; {
description = "Integrate micronucleus into the cargo buildsystem, flash an AVR firmware from an elf file";
mainProgram = "elf2nucleus";
2024-01-07 20:46:36 +00:00
homepage = "https://github.com/kpcyrd/elf2nucleus";
license = licenses.gpl3Plus;
maintainers = [ maintainers.marble ];
};
}