From 731ff64aed709874e5d8fcc8e4ba996495844da8 Mon Sep 17 00:00:00 2001 From: ilkecan Date: Tue, 20 Sep 2022 07:36:40 +0000 Subject: [PATCH] pet: install zsh completion file --- pkgs/development/tools/pet/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/pet/default.nix b/pkgs/development/tools/pet/default.nix index d759efb2b5b7..d51aa0561286 100644 --- a/pkgs/development/tools/pet/default.nix +++ b/pkgs/development/tools/pet/default.nix @@ -1,4 +1,4 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, installShellFiles, lib }: buildGoModule rec { pname = "pet"; @@ -17,6 +17,15 @@ buildGoModule rec { subPackages = [ "." ]; + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installShellCompletion --cmd pet \ + --zsh ./misc/completions/zsh/_pet + ''; + meta = with lib; { description = "Simple command-line snippet manager, written in Go"; homepage = "https://github.com/knqyf263/pet";