hugo: add man pages and shell completions

This commit is contained in:
Vincenzo Mantova 2021-03-27 11:36:37 +00:00
parent 693a938bef
commit 414d17a17b

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hugo";
@ -21,6 +21,17 @@ buildGoModule rec {
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
$out/bin/hugo gen man
installManPage man/*
installShellCompletion --cmd hugo \
--bash <($out/bin/hugo gen autocomplete --type=bash) \
--fish <($out/bin/hugo gen autocomplete --type=fish) \
--zsh <($out/bin/hugo gen autocomplete --type=zsh)
'';
meta = with lib; {
description = "A fast and modern static website engine";
homepage = "https://gohugo.io";