Merge pull request #228152 from figsoda/trufflehog

trufflehog: fix version
This commit is contained in:
Weijia Wang 2023-04-26 01:09:31 +03:00 committed by GitHub
commit 1dc0c7728d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
{ lib
, fetchFromGitHub
, buildGoModule
, testers
, trufflehog
}:
buildGoModule rec {
@ -16,6 +18,12 @@ buildGoModule rec {
vendorHash = "sha256-sSpRu6zLIvllrDYdtrj3oD3pCVs9ucSXbu3IYTqjT+k=";
ldflags = [
"-s"
"-w"
"-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}"
];
# Test cases run git clone and require network access
doCheck = false;
@ -23,6 +31,12 @@ buildGoModule rec {
rm $out/bin/{generate,snifftest}
'';
passthru = {
tests.version = testers.testVersion {
package = trufflehog;
};
};
meta = with lib; {
description = "Find credentials all over the place";
homepage = "https://github.com/trufflesecurity/trufflehog";