snazy: install shell completions, add figsoda as a maintainer

This commit is contained in:
figsoda 2022-10-08 21:08:39 -04:00
parent 83710dd612
commit 72a7254756

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 ];
};
}