diff options
author | Yueh-Shun Li <shamrocklee@posteo.net> | 2024-04-21 20:36:56 +0800 |
---|---|---|
committer | Yueh-Shun Li <shamrocklee@posteo.net> | 2024-04-21 20:36:56 +0800 |
commit | c00d9adbaf767943d41b7b1471fbf1f1962b283b (patch) | |
tree | 17de2b98f06c2d9714d061aa76433dfd277bc7ea /pkgs/by-name/ar | |
parent | 1361757956ac49b89ec2027a2922f2c7f777efe6 (diff) |
argc: move to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/ar')
-rw-r--r-- | pkgs/by-name/ar/argc/package.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/by-name/ar/argc/package.nix b/pkgs/by-name/ar/argc/package.nix new file mode 100644 index 0000000000000..0a3a1f393db51 --- /dev/null +++ b/pkgs/by-name/ar/argc/package.nix @@ -0,0 +1,42 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + installShellFiles, +}: + +rustPlatform.buildRustPackage rec { + pname = "argc"; + version = "1.14.0"; + + src = fetchFromGitHub { + owner = "sigoden"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Li/K5/SLG6JuoRJDz2DQoj1Oi9LQgZWHNvtZ1HVbj88="; + }; + + cargoHash = "sha256-D1T9FWTvwKtAYoqFlR2OmLRLGWhPJ9D8J7lq/QKcBoM="; + + 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"; + mainProgram = "argc"; + 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 ]; + }; +} |