From f85ff70f0a56d1d1d4115376dbc14f4de90ca7fb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 4 Dec 2024 15:42:51 +0100 Subject: [PATCH] trufflehog: migrate to versionCheckHook --- pkgs/tools/security/trufflehog/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/security/trufflehog/default.nix b/pkgs/tools/security/trufflehog/default.nix index f60ae664d02b..af0e142cc316 100644 --- a/pkgs/tools/security/trufflehog/default.nix +++ b/pkgs/tools/security/trufflehog/default.nix @@ -2,8 +2,7 @@ lib, fetchFromGitHub, buildGoModule, - testers, - trufflehog, + versionCheckHook, }: buildGoModule rec { @@ -21,6 +20,8 @@ buildGoModule rec { proxyVendor = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + ldflags = [ "-s" "-w" @@ -34,9 +35,9 @@ buildGoModule rec { rm $out/bin/{generate,snifftest} ''; - passthru = { - tests.version = testers.testVersion { package = trufflehog; }; - }; + doInstallCheck = true; + + versionCheckProgramArg = [ "--version" ]; meta = with lib; { description = "Find credentials all over the place";