depot/third_party/nixpkgs/pkgs/tools/security/trufflehog/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

47 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, trufflehog
}:
buildGoModule rec {
pname = "trufflehog";
version = "3.64.0";
src = fetchFromGitHub {
owner = "trufflesecurity";
repo = "trufflehog";
rev = "refs/tags/v${version}";
hash = "sha256-juacw+Y6gmEsmBtW3gDJQiQjjxh15Sr23dYoR7PuVTU=";
};
vendorHash = "sha256-qmU04k+gzn1A+Zq4GlZubud2g7Vs9uiWYiG6xWCBMVw=";
ldflags = [
"-s"
"-w"
"-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}"
];
# Test cases run git clone and require network access
doCheck = false;
postInstall = ''
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";
changelog = "https://github.com/trufflesecurity/trufflehog/releases/tag/v${version}";
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ fab ];
};
}