hugo: add man pages and shell completions
This commit is contained in:
parent
693a938bef
commit
414d17a17b
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue