diff options
author | Vincenzo Mantova <xworld21@users.sf.net> | 2021-03-27 11:36:37 +0000 |
---|---|---|
committer | Vincenzo Mantova <xworld21@users.sf.net> | 2021-03-28 11:13:36 +0100 |
commit | 414d17a17baf5316622fedafa6aa8694f1d62af8 (patch) | |
tree | a226e7464f0ce3b590890fe212a7dd4fa21cc0d8 /pkgs/applications | |
parent | 693a938bef1447c7ef3f988b5b5b7363018db862 (diff) |
hugo: add man pages and shell completions
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/hugo/default.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix index 8f3444d85d80a..bb748a1074c3c 100644 --- a/pkgs/applications/misc/hugo/default.nix +++ b/pkgs/applications/misc/hugo/default.nix @@ -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"; |