046dcd1811
Diff: https://github.com/sigoden/argc/compare/v1.10.0...v1.11.0 Changelog: https://github.com/sigoden/argc/releases/tag/v1.11.0
36 lines
994 B
Nix
36 lines
994 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "argc";
|
|
version = "1.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sigoden";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-BpTborNURfLdw4eyPbGMyNOSvtePB+lcCrCKTl0LoGQ=";
|
|
};
|
|
|
|
cargoHash = "sha256-1FdimBQZ4SvAnrYzNnyulUT8b8bTnJfnWRNosfQqSco=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd argc \
|
|
--bash <($out/bin/argc --argc-completions bash) \
|
|
--fish <($out/bin/argc --argc-completions fish) \
|
|
--zsh <($out/bin/argc --argc-completions zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A command-line options, arguments and sub-commands parser for bash";
|
|
homepage = "https://github.com/sigoden/argc";
|
|
changelog = "https://github.com/sigoden/argc/releases/tag/v${version}";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|