evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / hu / hugo / package.nix
blob2d57470e8cc079d466539b500ed24dcec45962ed
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.136.5";
17   src = fetchFromGitHub {
18     owner = "gohugoio";
19     repo = "hugo";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-NluV9/tqWTRfs2u9g4cHC1TyrxOXx3ghOZ4GDx7OZFo=";
22   };
24   vendorHash = "sha256-KqDsa7MlSONyn7AYOepQ95q1CEM83AhWk23iYSQ4twU=";
26   doCheck = false;
28   proxyVendor = true;
30   tags = [ "extended" ];
32   subPackages = [ "." ];
34   nativeBuildInputs = [ installShellFiles ];
36   ldflags = [
37     "-s"
38     "-w"
39     "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=nixpkgs"
40   ];
42   postInstall =
43     let
44       emulator = stdenv.hostPlatform.emulator buildPackages;
45     in
46     ''
47       ${emulator} $out/bin/hugo gen man
48       installManPage man/*
49       installShellCompletion --cmd hugo \
50         --bash <(${emulator} $out/bin/hugo completion bash) \
51         --fish <(${emulator} $out/bin/hugo completion fish) \
52         --zsh  <(${emulator} $out/bin/hugo completion zsh)
53     '';
55   passthru.tests.version = testers.testVersion {
56     package = hugo;
57     command = "hugo version";
58     version = "v${version}";
59   };
61   passthru.updateScript = nix-update-script { };
63   meta = {
64     changelog = "https://github.com/gohugoio/hugo/releases/tag/v${version}";
65     description = "Fast and modern static website engine";
66     homepage = "https://gohugo.io";
67     license = lib.licenses.asl20;
68     mainProgram = "hugo";
69     maintainers = with lib.maintainers; [
70       schneefux
71       Br1ght0ne
72       Frostman
73     ];
74   };