mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 01:23:03 +00:00
f1bb5c6cae
Diff: https://github.com/sigoden/argc/compare/v1.4.0...v1.5.0 Changelog: https://github.com/sigoden/argc/releases/tag/v1.5.0
37 lines
993 B
Nix
37 lines
993 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "argc";
|
|
version = "1.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sigoden";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-3e15knnM9CQn/nIh4H1Kd91qyE1KJ18jO0gk7UWz08Y=";
|
|
};
|
|
|
|
cargoHash = "sha256-NnK3SNBZNvXoSJhMu7Gg9HjAmAws8eD051iSZEfhfIw=";
|
|
|
|
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 ];
|
|
};
|
|
}
|