libgen-cli: install completions

This commit is contained in:
Mario Rodas 2020-06-08 18:18:18 -05:00
parent 0cde5898f4
commit 0700b31ff7
No known key found for this signature in database
GPG key ID: 325649BCA6D53027

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "libgen-cli";
version = "1.0.6";
@ -14,6 +14,15 @@ buildGoModule rec {
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash zsh; do
$out/bin/libgen-cli completion $shell > libgen-cli.$shell || :
installShellCompletion libgen-cli.$shell
done
'';
meta = with lib; {
homepage = "https://github.com/ciehanski/libgen-cli";
description =