Merge pull request #228152 from figsoda/trufflehog

trufflehog: fix version

authored by

Weijia Wang and committed by
GitHub
1dc0c772 3cbbd5c3

+14
+14
pkgs/tools/security/trufflehog/default.nix
··· 1 1 { lib 2 2 , fetchFromGitHub 3 3 , buildGoModule 4 + , testers 5 + , trufflehog 4 6 }: 5 7 6 8 buildGoModule rec { ··· 16 18 17 19 vendorHash = "sha256-sSpRu6zLIvllrDYdtrj3oD3pCVs9ucSXbu3IYTqjT+k="; 18 20 21 + ldflags = [ 22 + "-s" 23 + "-w" 24 + "-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}" 25 + ]; 26 + 19 27 # Test cases run git clone and require network access 20 28 doCheck = false; 21 29 22 30 postInstall = '' 23 31 rm $out/bin/{generate,snifftest} 24 32 ''; 33 + 34 + passthru = { 35 + tests.version = testers.testVersion { 36 + package = trufflehog; 37 + }; 38 + }; 25 39 26 40 meta = with lib; { 27 41 description = "Find credentials all over the place";