diff --git a/pkgs/tools/system/nats-top/default.nix b/pkgs/tools/system/nats-top/default.nix index 53d8ab9b3f99..49d70e0b30cf 100644 --- a/pkgs/tools/system/nats-top/default.nix +++ b/pkgs/tools/system/nats-top/default.nix @@ -1,6 +1,8 @@ { lib , buildGoModule , fetchFromGitHub +, testers +, nats-top }: buildGoModule rec { @@ -16,6 +18,19 @@ buildGoModule rec { vendorHash = "sha256-IhaeM/stU9O48reT/mUadSkZDz0JXKCXjSRw8TMesTY="; + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + passthru.tests = { + version = testers.testVersion { + package = nats-top; + version = "v${version}"; + }; + }; + meta = with lib; { description = "top-like tool for monitoring NATS servers"; homepage = "https://github.com/nats-io/nats-top";