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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2022-09-20 17:11:36 +02:00
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, buildPackages }:
2016-06-17 17:38:40 +02:00
buildGoModule rec {
pname = "hugo";
version = "0.105.0";
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}";
sha256 = "sha256-qKcybKgdNkn3AhDVwl1vCYt0HoQimz8qi+O95jKaW8Q=";
2016-06-17 17:38:40 +02:00
};
vendorSha256 = "sha256-M74pfS7bmSrXhUvQ3hDokBPNLYxJslc9UGR3Bhp2BBQ=";
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
subPackages = [ "." ];
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
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)
'';
meta = with lib; {
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;
maintainers = with maintainers; [ schneefux Br1ght0ne Frostman ];
2016-10-09 18:44:25 +02:00
};
2016-06-17 17:38:40 +02:00
}