diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/hugo/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/misc/hugo/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/hugo/default.nix b/nixpkgs/pkgs/applications/misc/hugo/default.nix new file mode 100644 index 000000000000..9834e91309da --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/hugo/default.nix @@ -0,0 +1,41 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: + +buildGoModule rec { + pname = "hugo"; + version = "0.84.0"; + + src = fetchFromGitHub { + owner = "gohugoio"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-BRp4iboiaoB6zFwleFSJ7oVAd3o6OiR5BB4VRQilExc="; + }; + + vendorSha256 = "sha256-jY/g92ON5OxjuZzPHJNduXYMgPU8/0ioAYvp4iqjGnU="; + + doCheck = false; + + runVend = true; + + buildFlags = [ "-tags" "extended" ]; + + 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"; + license = licenses.asl20; + maintainers = with maintainers; [ schneefux Br1ght0ne Frostman ]; + }; +} |