hugo: add ldflags

This commit is contained in:
Mario Rodas 2022-08-30 13:18:00 +00:00
parent 65847ae58b
commit 312b2eb1b8

View file

@ -1,4 +1,4 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles }: { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec { buildGoModule rec {
pname = "hugo"; pname = "hugo";
@ -23,6 +23,8 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-s" "-w" "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs" ];
postInstall = '' postInstall = ''
$out/bin/hugo gen man $out/bin/hugo gen man
installManPage man/* installManPage man/*