From 0a4c5699f340f654e2d67b521995abba7801781a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 3 Dec 2024 11:27:38 +0100 Subject: [PATCH] gotestwaf: migrate to versionCheckHook --- pkgs/tools/security/gotestwaf/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/security/gotestwaf/default.nix b/pkgs/tools/security/gotestwaf/default.nix index 32797408a874..747ee15bf070 100644 --- a/pkgs/tools/security/gotestwaf/default.nix +++ b/pkgs/tools/security/gotestwaf/default.nix @@ -2,8 +2,7 @@ lib, buildGoModule, fetchFromGitHub, - gotestwaf, - testers, + versionCheckHook, }: buildGoModule rec { @@ -19,8 +18,7 @@ buildGoModule rec { vendorHash = "sha256-mPqCphweDF9RQibdjTaXXfXdO8NENHVMdIPxrJEw2g4="; - # Some tests require networking as of v0.4.0 - doCheck = false; + nativeInstallCheckInputs = [ versionCheckHook ]; ldflags = [ "-w" @@ -28,11 +26,12 @@ buildGoModule rec { "-X=github.com/wallarm/gotestwaf/internal/version.Version=v${version}" ]; - passthru.tests.version = testers.testVersion { - command = "gotestwaf --version"; - package = gotestwaf; - version = "v${version}"; - }; + # Tests require network access + doCheck = false; + + doInstallCheck = true; + + versionCheckProgramArg = [ "--version" ]; meta = with lib; { description = "Tool for API and OWASP attack simulation";