Unverified Commit c4a1ce59 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

bombardier: maintain (#483044)

parents 6fd2f26d 0e2c8a40
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -4,16 +4,18 @@
  fetchFromGitHub,
  testers,
  bombardier,
  versionCheckHook,
  nix-update-script,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "bombardier";
  version = "2.0.2";

  src = fetchFromGitHub {
    owner = "codesenberg";
    repo = "bombardier";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-FoaiUky0WcipkGN8KIpSd+iizinlqtHC5lskvNCnx/Y=";
  };

@@ -26,12 +28,17 @@ buildGoModule rec {
  ldflags = [
    "-s"
    "-w"
    "-X=main.version=${version}"
    "-X=main.version=${finalAttrs.version}"
  ];

  __darwinAllowLocalNetworking = true;

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";

  passthru.tests = {
    updateScript = nix-update-script { };
    version = testers.testVersion {
      package = bombardier;
    };
@@ -40,9 +47,9 @@ buildGoModule rec {
  meta = {
    description = "Fast cross-platform HTTP benchmarking tool written in Go";
    homepage = "https://github.com/codesenberg/bombardier";
    changelog = "https://github.com/codesenberg/bombardier/releases/tag/${src.rev}";
    changelog = "https://github.com/codesenberg/bombardier/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.mit;
    maintainers = [ ];
    maintainers = [ lib.maintainers.progrm_jarvis ];
    mainProgram = "bombardier";
  };
}
})