3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/hugo/default.nix
2021-08-06 11:58:33 +09:00

42 lines
1,020 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hugo";
version = "0.87.0";
src = fetchFromGitHub {
owner = "gohugoio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-2I1PDxbqtaOOlVbr7zhuawaFrFWM/PYt5QJm3N74Noc=";
};
vendorSha256 = "sha256-0pkQ+VcmK2XLaQ2XJHh5/QftSdud6Eo1nlBK+L92xKU=";
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 ];
};
}