2022-09-20 17:11:36 +02:00
|
|
|
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, buildPackages }:
|
2016-06-17 17:38:40 +02:00
|
|
|
|
2019-03-08 22:40:10 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hugo";
|
2022-10-28 15:20:07 +02:00
|
|
|
version = "0.105.0";
|
2020-03-27 08:33:21 +01:00
|
|
|
|
2016-06-17 17:38:40 +02:00
|
|
|
src = fetchFromGitHub {
|
2019-12-03 19:16:13 +01:00
|
|
|
owner = "gohugoio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-28 15:20:07 +02:00
|
|
|
sha256 = "sha256-qKcybKgdNkn3AhDVwl1vCYt0HoQimz8qi+O95jKaW8Q=";
|
2016-06-17 17:38:40 +02:00
|
|
|
};
|
|
|
|
|
2022-10-28 15:20:07 +02:00
|
|
|
vendorSha256 = "sha256-M74pfS7bmSrXhUvQ3hDokBPNLYxJslc9UGR3Bhp2BBQ=";
|
2020-08-04 02:26:27 +02:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-01-01 06:05:03 +01:00
|
|
|
proxyVendor = true;
|
2016-10-09 18:44:25 +02:00
|
|
|
|
2021-08-05 23:52:29 +02:00
|
|
|
tags = [ "extended" ];
|
2018-08-02 20:49:19 +02:00
|
|
|
|
2019-03-08 22:40:10 +01:00
|
|
|
subPackages = [ "." ];
|
2018-06-18 10:51:13 +02:00
|
|
|
|
2021-03-27 12:36:37 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-08-30 15:18:00 +02:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs" ];
|
|
|
|
|
2022-09-20 17:11:36 +02:00
|
|
|
postInstall = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
|
|
|
${emulator} $out/bin/hugo gen man
|
2021-03-27 12:36:37 +01:00
|
|
|
installManPage man/*
|
|
|
|
installShellCompletion --cmd hugo \
|
2022-09-20 17:11:36 +02:00
|
|
|
--bash <(${emulator} $out/bin/hugo completion bash) \
|
|
|
|
--fish <(${emulator} $out/bin/hugo completion fish) \
|
|
|
|
--zsh <(${emulator} $out/bin/hugo completion zsh)
|
2021-03-27 12:36:37 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "A fast and modern static website engine";
|
2019-12-03 19:16:13 +01:00
|
|
|
homepage = "https://gohugo.io";
|
2018-02-21 15:08:58 +01:00
|
|
|
license = licenses.asl20;
|
2020-11-17 12:02:06 +01:00
|
|
|
maintainers = with maintainers; [ schneefux Br1ght0ne Frostman ];
|
2016-10-09 18:44:25 +02:00
|
|
|
};
|
2016-06-17 17:38:40 +02:00
|
|
|
}
|