Merge pull request #195164 from figsoda/snazy

snazy: install shell completions, add figsoda as a maintainer
This commit is contained in:
Mario Rodas 2022-10-08 22:55:19 -05:00 committed by GitHub
commit a8a4ec9283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, rustPlatform }:
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "snazy";
@ -10,8 +10,18 @@ rustPlatform.buildRustPackage rec {
rev = version;
sha256 = "sha256-wSRIJF2XPJvzmxuGbuPYPFgn9Eap3vqHT1CM/oQy8vM=";
};
cargoSha256 = "sha256-IGZZEyy9IGqkpsbnOzLdBSFbinZ7jhH2LWub/+gP89E=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd snazy \
--bash <($out/bin/snazy --shell-completion bash) \
--fish <($out/bin/snazy --shell-completion fish) \
--zsh <($out/bin/snazy --shell-completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
@ -29,6 +39,6 @@ rustPlatform.buildRustPackage rec {
with nice colors.
'';
license = licenses.asl20;
maintainers = with maintainers; [ jk ];
maintainers = with maintainers; [ figsoda jk ];
};
}