01ed8ef136
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, buildPackages }:
|
|
|
|
buildGoModule rec {
|
|
pname = "hugo";
|
|
version = "0.106.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gohugoio";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Dyre/ou0kjEqbq8WGGM/n8+JBTMNslbnmj+5clYJUHs=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-dhsGGu4uNrqKv6szGqruAcI2UTbbXknKaKk5pVCQB5A=";
|
|
|
|
doCheck = false;
|
|
|
|
proxyVendor = true;
|
|
|
|
tags = [ "extended" ];
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs" ];
|
|
|
|
postInstall = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
|
${emulator} $out/bin/hugo gen man
|
|
installManPage man/*
|
|
installShellCompletion --cmd hugo \
|
|
--bash <(${emulator} $out/bin/hugo completion bash) \
|
|
--fish <(${emulator} $out/bin/hugo completion fish) \
|
|
--zsh <(${emulator} $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 ];
|
|
};
|
|
}
|