{ lib, fetchFromGitHub, buildGoModule, versionCheckHook, }: buildGoModule rec { pname = "trufflehog"; version = "3.84.2"; src = fetchFromGitHub { owner = "trufflesecurity"; repo = "trufflehog"; rev = "refs/tags/v${version}"; hash = "sha256-NpWXjZstFpl0oZhzMnCFt7IFyWfpJybGaeyOSxjVPWY="; }; vendorHash = "sha256-s4oks1OP9qN/2JMN6TI36mBWvGXE2HnDHFAMCRFVB1w="; proxyVendor = true; nativeInstallCheckInputs = [ versionCheckHook ]; 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} ''; doInstallCheck = true; versionCheckProgramArg = [ "--version" ]; 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 ]; }; }