2022-09-30 11:47:45 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "argc";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "0.15.1";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigoden";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-24 00:07:29 +00:00
|
|
|
sha256 = "sha256-hN8M12evYxqNSsQKm0oRf3/b7WUf8k8pWa+0vRHstv4=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
cargoSha256 = "sha256-JCFBA9LuNILJs4flzD/bGpv/R2vxMlA0aFTVdGKKs5I=";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-03-15 16:39:30 +00:00
|
|
|
installShellCompletion completions/argc.{bash,fish,zsh}
|
2022-09-30 11:47:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to handle sh/bash cli parameters";
|
|
|
|
homepage = "https://github.com/sigoden/argc";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/sigoden/argc/releases/tag/v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|