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