about summary refs log tree commit diff
path: root/pkgs/applications/misc/hugo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/hugo/default.nix')
-rw-r--r--pkgs/applications/misc/hugo/default.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix
index 2c757519474a..c30ac28863f4 100644
--- a/pkgs/applications/misc/hugo/default.nix
+++ b/pkgs/applications/misc/hugo/default.nix
@@ -1,4 +1,12 @@
-{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, buildPackages }:
+{ stdenv
+, lib
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+, buildPackages
+, testers
+, hugo
+}:
 
 buildGoModule rec {
   pname = "hugo";
@@ -34,6 +42,12 @@ buildGoModule rec {
       --zsh  <(${emulator} $out/bin/hugo completion zsh)
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = hugo;
+    command = "hugo version";
+    version = "v${version}";
+  };
+
   meta = with lib; {
     description = "A fast and modern static website engine";
     homepage = "https://gohugo.io";