2022-09-09 14:08:57 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hugo";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.104.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gohugoio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-cR+S84ROSAnK1FXLX+f3BXKcxp8W/noA9cg0XvEXbaU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
vendorSha256 = "sha256-K7rQSs4PqFGV4gZ6UevS7S0w0OQykAkHntklKz5vPrU=";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
proxyVendor = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-06 21:57:35 +00:00
|
|
|
tags = [ "extended" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs" ];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
$out/bin/hugo gen man
|
|
|
|
installManPage man/*
|
|
|
|
installShellCompletion --cmd hugo \
|
2022-04-15 01:41:22 +00:00
|
|
|
--bash <($out/bin/hugo completion bash) \
|
|
|
|
--fish <($out/bin/hugo completion fish) \
|
|
|
|
--zsh <($out/bin/hugo completion zsh)
|
2021-03-20 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "A fast and modern static website engine";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gohugo.io";
|
|
|
|
license = licenses.asl20;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ schneefux Br1ght0ne Frostman ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|