about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2023-12-25 16:04:23 +0100
committerGitHub <noreply@github.com>2023-12-25 16:04:23 +0100
commit44823f6d449d3a82b58bbe3ed02c5b660f78f7bb (patch)
treede79a99e8253f0c5b47288f2a576899cd9885afd /pkgs/by-name
parentfc7e2a3bd4553a96b57e8031e75aa328c8a77a90 (diff)
parenta2ed961c894c242fcffe27ad24cd27523dc5ec62 (diff)
Merge pull request #276678 from drupol/fix/hugo/add-missing-mainProgram
hugo: add missing `meta.mainProgram`
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/hu/hugo/package.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/hu/hugo/package.nix b/pkgs/by-name/hu/hugo/package.nix
new file mode 100644
index 0000000000000..3c2cce32fb2c3
--- /dev/null
+++ b/pkgs/by-name/hu/hugo/package.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+, buildPackages
+, testers
+, hugo
+}:
+
+buildGoModule rec {
+  pname = "hugo";
+  version = "0.121.1";
+
+  src = fetchFromGitHub {
+    owner = "gohugoio";
+    repo = "hugo";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-XNOp0k2t5Tv4HKKz3ZqL/sAdiYedOACaZ/1T7t7/Q1A=";
+  };
+
+  vendorHash = "sha256-J/me67pC+YWjGIQP6q1c+vsSXFxXoLZV7AyDv3+606k=";
+
+  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)
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = hugo;
+    command = "hugo version";
+    version = "v${version}";
+  };
+
+  meta = {
+    changelog = "https://github.com/gohugoio/hugo/releases/tag/v${version}";
+    description = "A fast and modern static website engine";
+    homepage = "https://gohugo.io";
+    license = lib.licenses.asl20;
+    mainProgram = "hugo";
+    maintainers = with lib.maintainers; [ schneefux Br1ght0ne Frostman ];
+  };
+}