Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / argc / default.nix
blobb36331e8126f1ed3b7a3dbdd3c5f70125b7bb0fa
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , installShellFiles
5 }:
7 rustPlatform.buildRustPackage rec {
8   pname = "argc";
9   version = "1.12.0";
11   src = fetchFromGitHub {
12     owner = "sigoden";
13     repo = pname;
14     rev = "v${version}";
15     hash = "sha256-bF+NTiPrqWD1B/v44+XuxXotOPhUBCYyg6h+T/ydmGM=";
16   };
18   cargoHash = "sha256-T6NfjlHQhHwfcAnmr8R2WWXVKgMZZXFq6IvlvWOVACg=";
20   nativeBuildInputs = [ installShellFiles ];
22   postInstall = ''
23     installShellCompletion --cmd argc \
24       --bash <($out/bin/argc --argc-completions bash) \
25       --fish <($out/bin/argc --argc-completions fish) \
26       --zsh <($out/bin/argc --argc-completions zsh)
27   '';
29   meta = with lib; {
30     description = "A command-line options, arguments and sub-commands parser for bash";
31     homepage = "https://github.com/sigoden/argc";
32     changelog = "https://github.com/sigoden/argc/releases/tag/v${version}";
33     license = with licenses; [ mit /* or */ asl20 ];
34     maintainers = with maintainers; [ figsoda ];
35   };