nixpkgs/pkgs/tools/security/trufflehog/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-05 19:13:49 +00:00
{ lib
2022-12-30 04:01:53 +00:00
, fetchFromGitHub
, buildGoModule
2023-04-25 15:05:29 +00:00
, testers
, trufflehog
2022-12-05 19:13:49 +00:00
}:
2022-12-30 04:01:53 +00:00
buildGoModule rec {
pname = "trufflehog";
version = "3.54.3";
2022-12-30 04:01:53 +00:00
src = fetchFromGitHub {
owner = "trufflesecurity";
repo = "trufflehog";
2023-01-04 08:31:13 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-nd0Qog4bwtAlXtDIXdE/mTSEBbBBUWT4FJkyl32PCVI=";
2022-12-30 04:01:53 +00:00
};
vendorHash = "sha256-zYvKhhwN5TtJQxkkcY5U9LtTdMb97ucfksxpTMKH/Zc=";
2023-04-25 14:57:22 +00:00
ldflags = [
"-s"
"-w"
"-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}"
];
2022-12-30 04:01:53 +00:00
# Test cases run git clone and require network access
doCheck = false;
2022-12-30 04:01:53 +00:00
postInstall = ''
rm $out/bin/{generate,snifftest}
'';
2023-04-25 15:05:29 +00:00
passthru = {
tests.version = testers.testVersion {
package = trufflehog;
};
};
2022-12-30 04:01:53 +00:00
meta = with lib; {
description = "Find credentials all over the place";
homepage = "https://github.com/trufflesecurity/trufflehog";
2023-01-04 08:31:13 +00:00
changelog = "https://github.com/trufflesecurity/trufflehog/releases/tag/v${version}";
2023-01-20 07:48:48 +00:00
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ fab ];
2022-12-30 04:01:53 +00:00
};
}