mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
testers,
|
|
trufflehog,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "trufflehog";
|
|
version = "3.82.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trufflesecurity";
|
|
repo = "trufflehog";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-reQJE3UG1bWS3RrMW2c4nq/2AOQ3mYtbXVKu+cwzrJM=";
|
|
};
|
|
|
|
vendorHash = "sha256-h3thO9sYYv2yiVcBPEu36RiYgYNnumRc73bNXNOIdA4=";
|
|
|
|
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 ];
|
|
};
|
|
}
|