2022-10-06 18:32:54 +00:00
|
|
|
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, buildPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hugo";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "0.107.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gohugoio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "sha256-8Ru1T6GSz5TfMxFvUU2QgpiWNLJK+ky723qc3flrDIw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
vendorSha256 = "sha256-92QLkSUrwMEZ/8pIeOj4KKtC47oN+ITxJnpp7Fb0Z10=";
|
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" ];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
postInstall = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
|
|
|
${emulator} $out/bin/hugo gen man
|
2021-03-20 04:20:00 +00:00
|
|
|
installManPage man/*
|
|
|
|
installShellCompletion --cmd hugo \
|
2022-10-06 18:32:54 +00:00
|
|
|
--bash <(${emulator} $out/bin/hugo completion bash) \
|
|
|
|
--fish <(${emulator} $out/bin/hugo completion fish) \
|
|
|
|
--zsh <(${emulator} $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
|
|
|
};
|
|
|
|
}
|