2023-07-15 17:15:38 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, ghz }:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ghz";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.118.0";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bojand";
|
|
|
|
repo = "ghz";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-oBxkXe5PHdi5H5qSwV2G6+wBTvI4nRJuaRnUiq/3l+c=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-h/obb+hJ0XnE7GK7G5djITjiL0OjjIk1q68JM8+EfHo=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/ghz" "cmd/ghz-web" ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = ghz;
|
|
|
|
};
|
|
|
|
web-version = testers.testVersion {
|
|
|
|
package = ghz;
|
|
|
|
command = "ghz-web -v";
|
|
|
|
};
|
|
|
|
};
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple gRPC benchmarking and load testing tool";
|
|
|
|
homepage = "https://ghz.sh";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|