diff --git a/pkgs/development/tools/snazy/default.nix b/pkgs/development/tools/snazy/default.nix index 8c490944a65d..4dbd230d563b 100644 --- a/pkgs/development/tools/snazy/default.nix +++ b/pkgs/development/tools/snazy/default.nix @@ -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 ]; }; }