nixpkgs/pkgs/development/tools/argc/default.nix

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

37 lines
993 B
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
}:
2022-09-26 18:31:01 +00:00
rustPlatform.buildRustPackage rec {
pname = "argc";
version = "1.8.0";
2022-09-26 18:31:01 +00:00
src = fetchFromGitHub {
owner = "sigoden";
repo = pname;
rev = "v${version}";
hash = "sha256-xuSoTTtULVdG1LZFiEPYYuwJxG7FdN9vY+7K7OmfWZI=";
2022-09-26 18:31:01 +00:00
};
cargoHash = "sha256-BJaVaOBCLH5c7/DrsOq6uVN02wEfLA7k+FgxCBmOUTA=";
2022-09-26 18:31:01 +00:00
nativeBuildInputs = [ installShellFiles ];
2022-09-26 18:31:01 +00:00
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)
2022-09-26 18:31:01 +00:00
'';
meta = with lib; {
description = "A command-line options, arguments and sub-commands parser for bash";
2022-09-26 18:31:01 +00:00
homepage = "https://github.com/sigoden/argc";
changelog = "https://github.com/sigoden/argc/releases/tag/v${version}";
2022-09-26 18:31:01 +00:00
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ figsoda ];
};
}