From 72a72547566813fd019c1c6b72f2de9f6622a77f Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 8 Oct 2022 21:08:39 -0400 Subject: [PATCH] snazy: install shell completions, add figsoda as a maintainer --- pkgs/development/tools/snazy/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 ]; }; }