depot/third_party/nixpkgs/pkgs/applications/misc/hugo/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

41 lines
1,020 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hugo";
version = "0.89.4";
src = fetchFromGitHub {
owner = "gohugoio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-yXOe+SCMvr3xi0kd2AuWm1CzzBuODCED6p7kaWGXvpM=";
};
vendorSha256 = "sha256-NqWi9n8H5IeMmkBwTX3HN1RLLtWA5sM1iy1L2BZCH7M=";
doCheck = false;
runVend = true;
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 ];
};
}