From 37acc4a5d1fd4c87a5165bc9c1ee1274abbea0d1 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 31 Dec 2024 15:26:07 +0530 Subject: [PATCH] papeer: install shell completion files --- pkgs/by-name/pa/papeer/package.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/pa/papeer/package.nix b/pkgs/by-name/pa/papeer/package.nix index aba9b64bfab8d..d123378f052fc 100644 --- a/pkgs/by-name/pa/papeer/package.nix +++ b/pkgs/by-name/pa/papeer/package.nix @@ -1,4 +1,9 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, +}: buildGoModule rec { pname = "papeer"; @@ -13,6 +18,14 @@ buildGoModule rec { vendorHash = "sha256-3QRSdkx9p0H+zPB//bpWCBKKjKjrx0lHMk5lFm+U7pA="; + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' + installShellCompletion --cmd papeer \ + --bash <($out/bin/papeer completion bash) \ + --fish <($out/bin/papeer completion fish) \ + --zsh <($out/bin/papeer completion zsh) + ''; + doCheck = false; # uses network meta = {