nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 56 lines 1.3 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 versionCheckHook, 6 makeWrapper, 7}: 8 9buildGoModule (finalAttrs: { 10 pname = "trufflehog"; 11 version = "3.92.5"; 12 13 src = fetchFromGitHub { 14 owner = "trufflesecurity"; 15 repo = "trufflehog"; 16 tag = "v${finalAttrs.version}"; 17 hash = "sha256-9nzcFw+7dpkSNAYy6Rh+qhhneO44tYCHEPPM2KDzs/4="; 18 }; 19 20 vendorHash = "sha256-98yTB5Wu2W2xesg9NMPv+Yij/stutRSP98MeTf807Jo="; 21 22 nativeBuildInputs = [ makeWrapper ]; 23 24 proxyVendor = true; 25 26 nativeInstallCheckInputs = [ versionCheckHook ]; 27 28 ldflags = [ 29 "-s" 30 "-w" 31 "-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${finalAttrs.version}" 32 ]; 33 34 # Test cases run git clone and require network access 35 doCheck = false; 36 37 postInstall = '' 38 rm $out/bin/{generate,snifftest} 39 40 wrapProgram $out/bin/trufflehog --add-flags --no-update 41 ''; 42 43 doInstallCheck = true; 44 45 meta = { 46 description = "Find credentials all over the place"; 47 homepage = "https://github.com/trufflesecurity/trufflehog"; 48 changelog = "https://github.com/trufflesecurity/trufflehog/releases/tag/${finalAttrs.src.tag}"; 49 license = with lib.licenses; [ agpl3Only ]; 50 maintainers = with lib.maintainers; [ 51 fab 52 sarcasticadmin 53 ]; 54 mainProgram = "trufflehog"; 55 }; 56})