nixos/uptime-kuma: Add additional lockdown settings to systemd unit (#361452)
[NixPkgs.git] / pkgs / by-name / hu / hugo / package.nix
blob1807d306527d4da9343bb0b9ad7ed10cc78d0c36
2   stdenv,
3   lib,
4   buildGoModule,
5   fetchFromGitHub,
6   installShellFiles,
7   buildPackages,
8   testers,
9   nix-update-script,
10   hugo,
13 buildGoModule rec {
14   pname = "hugo";
15   version = "0.139.0";
17   src = fetchFromGitHub {
18     owner = "gohugoio";
19     repo = "hugo";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-UXOZCiwYpMnJsNSO7y3CsB8nmPxtBErYYl8YwWO3Hts=";
22   };
24   vendorHash = "sha256-qhiCZMSLRnLbyHplcaPn/BGJ3Lv8O8eEvCuIHwA4sMs=";
26   doCheck = false;
28   proxyVendor = true;
30   tags = [
31     "extended"
32     "withdeploy"
33   ];
35   subPackages = [ "." ];
37   nativeBuildInputs = [ installShellFiles ];
39   ldflags = [
40     "-s"
41     "-w"
42     "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs"
43   ];
45   postInstall =
46     let
47       emulator = stdenv.hostPlatform.emulator buildPackages;
48     in
49     ''
50       ${emulator} $out/bin/hugo gen man
51       installManPage man/*
52       installShellCompletion --cmd hugo \
53         --bash <(${emulator} $out/bin/hugo completion bash) \
54         --fish <(${emulator} $out/bin/hugo completion fish) \
55         --zsh  <(${emulator} $out/bin/hugo completion zsh)
56     '';
58   passthru.tests.version = testers.testVersion {
59     package = hugo;
60     command = "hugo version";
61     version = "v${version}";
62   };
64   passthru.updateScript = nix-update-script { };
66   meta = {
67     changelog = "https://github.com/gohugoio/hugo/releases/tag/v${version}";
68     description = "Fast and modern static website engine";
69     homepage = "https://gohugo.io";
70     license = lib.licenses.asl20;
71     mainProgram = "hugo";
72     maintainers = with lib.maintainers; [
73       schneefux
74       Br1ght0ne
75       Frostman
76     ];
77   };