2022-09-26 18:31:01 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "argc";
|
2023-03-13 14:10:24 +00:00
|
|
|
version = "0.13.0";
|
2022-09-26 18:31:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigoden";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-13 14:10:24 +00:00
|
|
|
sha256 = "sha256-G5dEN1yO/WnMLVZtxL6vD+YjvHDWiWehZSqeL43IDXE=";
|
2022-09-26 18:31:01 +00:00
|
|
|
};
|
|
|
|
|
2023-03-13 14:10:24 +00:00
|
|
|
cargoSha256 = "sha256-carsp6IRFCw5bLRYoyy6QP8jnImTSf/6GxYDH9lR7GA=";
|
2022-09-26 18:31:01 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion completions/argc.{bash,zsh}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to handle sh/bash cli parameters";
|
|
|
|
homepage = "https://github.com/sigoden/argc";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|