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 {
|
buildGoModule rec {
|
||||||
pname = "hugo";
|
pname = "hugo";
|
||||||
@ -21,6 +21,17 @@ buildGoModule rec {
|
|||||||
|
|
||||||
subPackages = [ "." ];
|
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; {
|
meta = with lib; {
|
||||||
description = "A fast and modern static website engine";
|
description = "A fast and modern static website engine";
|
||||||
homepage = "https://gohugo.io";
|
homepage = "https://gohugo.io";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user