depot/third_party/nixpkgs/pkgs/applications/misc/hugo/default.nix

44 lines
1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hugo";
version = "0.104.1";
src = fetchFromGitHub {
owner = "gohugoio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-cR+S84ROSAnK1FXLX+f3BXKcxp8W/noA9cg0XvEXbaU=";
};
vendorSha256 = "sha256-K7rQSs4PqFGV4gZ6UevS7S0w0OQykAkHntklKz5vPrU=";
doCheck = false;
proxyVendor = true;
tags = [ "extended" ];
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-s" "-w" "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs" ];
postInstall = ''
$out/bin/hugo gen man
installManPage man/*
installShellCompletion --cmd hugo \
--bash <($out/bin/hugo completion bash) \
--fish <($out/bin/hugo completion fish) \
--zsh <($out/bin/hugo completion 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 ];
};
}