about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/sonobuoy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/sonobuoy/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/sonobuoy/default.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/applications/networking/cluster/sonobuoy/default.nix b/pkgs/applications/networking/cluster/sonobuoy/default.nix
index 6900dc5607ec..a62efd6833fb 100644
--- a/pkgs/applications/networking/cluster/sonobuoy/default.nix
+++ b/pkgs/applications/networking/cluster/sonobuoy/default.nix
@@ -1,7 +1,8 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, testers, sonobuoy }:
 
 # SHA of ${version} for the tool's help output. Unfortunately this is needed in build flags.
-let rev = "6f9e27f1795f10475c9f6f5decdff692e1e228da";
+# The update script can update this automatically, the comment is used to find the line.
+let rev = "6f9e27f1795f10475c9f6f5decdff692e1e228da"; # update-commit-sha
 in
 buildGoModule rec {
   pname = "sonobuoy";
@@ -27,11 +28,17 @@ buildGoModule rec {
 
   subPackages = [ "." ];
 
+  passthru = {
+    updateScript = ./update.sh;
+    tests.version = testers.testVersion {
+      package = sonobuoy;
+      command = "sonobuoy version";
+      version = "v${version}";
+    };
+  };
+
   meta = with lib; {
-    description = ''
-      Diagnostic tool that makes it easier to understand the
-      state of a Kubernetes cluster.
-    '';
+    description = "Diagnostic tool that makes it easier to understand the state of a Kubernetes cluster";
     longDescription = ''
       Sonobuoy is a diagnostic tool that makes it easier to understand the state of
       a Kubernetes cluster by running a set of Kubernetes conformance tests in an
@@ -39,7 +46,9 @@ buildGoModule rec {
     '';
 
     homepage = "https://sonobuoy.io";
+    changelog = "https://github.com/vmware-tanzu/sonobuoy/releases/tag/v${version}";
     license = licenses.asl20;
+    mainProgram = "sonobuoy";
     maintainers = with maintainers; [ carlosdagos saschagrunert wilsonehusin ];
   };
 }