depot/third_party/nixpkgs/pkgs/tools/security/trufflehog/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

48 lines
1.1 KiB
Nix

{
lib,
fetchFromGitHub,
buildGoModule,
testers,
trufflehog,
}:
buildGoModule rec {
pname = "trufflehog";
version = "3.80.2";
src = fetchFromGitHub {
owner = "trufflesecurity";
repo = "trufflehog";
rev = "refs/tags/v${version}";
hash = "sha256-FiwUkBKh1g4NifF0O4hhZSnZExOw99R9ZX8ANaG9Ym8=";
};
vendorHash = "sha256-uZ57v1yYH955zDKE7nfXkmroAzUPbO/7MVn9u9M5DKU=";
proxyVendor = true;
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 ];
};
}