Merge pull request #240983 from figsoda/ghz

ghz: fix version
This commit is contained in:
figsoda 2023-07-02 09:11:58 -04:00 committed by GitHub
commit e135a81fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";