diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-03-28 18:37:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 18:37:42 +0200 |
commit | 6403a26e49a7bd08a0379d661bb9093387b7b95a (patch) | |
tree | 26374d7f53b660d8935282674a905d0e2a0b704a /pkgs/applications | |
parent | 7e3a726f0657aafe9f16bcada298f4863305af43 (diff) | |
parent | 414d17a17baf5316622fedafa6aa8694f1d62af8 (diff) |
Merge pull request #117778 from xworld21/hugo-shell-completions
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"; |