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