Merge pull request #279447 from cyber-murmel/elf2nucleus

elf2nucleus: init at 0.1.0
This commit is contained in:
a-n-n-a-l-e-e 2024-01-20 01:24:52 -08:00 committed by GitHub
commit 4c86cc83ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 0 deletions

View File

@ -11363,6 +11363,12 @@
githubId = 1651325;
name = "maralorn";
};
marble = {
email = "nixpkgs@computer-in.love";
github = "cyber-murmel";
githubId = 30078229;
name = "marble";
};
marcovergueira = {
email = "vergueira.marco@gmail.com";
github = "marcovergueira";

View File

@ -0,0 +1,39 @@
{
installShellFiles
, fetchFromGitHub
, lib
, micronucleus
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "elf2nucleus";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kpcyrd";
repo = pname;
rev = "v${version}";
sha256 = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA=";
};
cargoSha256 = "sha256-IeQnI6WTzxSI/VzoHtVukZtB1jX98wzLOT01NMLD5wQ=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ micronucleus ];
postInstall = ''
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";
homepage = "https://github.com/kpcyrd/elf2nucleus";
license = licenses.gpl3Plus;
maintainers = [ maintainers.marble ];
};
}