diff options
author | figsoda <figsoda@pm.me> | 2023-07-02 09:11:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 09:11:58 -0400 |
commit | e135a81fb42fb4c1574a8d41e88840aa2b90669b (patch) | |
tree | be225aa16aed7705fc155649d7c6290e28d324ee | |
parent | 79809c44a8f0961b7ec816a2ca0d7940ef197b02 (diff) | |
parent | d3812c83070176a5503b8e75c7b0c3ade1a01038 (diff) |
Merge pull request #240983 from figsoda/ghz
ghz: fix version
-rw-r--r-- | pkgs/tools/networking/ghz/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/tools/networking/ghz/default.nix b/pkgs/tools/networking/ghz/default.nix index 495d9dd3a1f3a..89253f3fe4891 100644 --- a/pkgs/tools/networking/ghz/default.nix +++ b/pkgs/tools/networking/ghz/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, testers, ghz }: buildGoModule rec { pname = "ghz"; @@ -15,7 +15,21 @@ buildGoModule rec { subPackages = [ "cmd/ghz" "cmd/ghz-web" ]; - ldflags = [ "-s" "-w" ]; + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + passthru.tests = { + version = testers.testVersion { + package = ghz; + }; + web-version = testers.testVersion { + package = ghz; + command = "ghz-web -v"; + }; + }; meta = with lib; { description = "Simple gRPC benchmarking and load testing tool"; |