2024-06-20 14:57:18 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-06-24 18:47:55 +00:00
|
|
|
stdenv,
|
2024-06-20 14:57:18 +00:00
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
2024-06-24 18:47:55 +00:00
|
|
|
installShellFiles,
|
2024-06-20 14:57:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "poutine";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.13.0";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "boostsecurityio";
|
|
|
|
repo = "poutine";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-9vbK2tc57e/YNfhSVbCMxnzOmmahr9T3x5Tt7GQjVnc=";
|
2024-06-20 14:57:18 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
vendorHash = "sha256-HYuyGSatUOch73IKc7/9imhwz0Oz6Mrccs2HKVQtaVE=";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd ${meta.mainProgram} \
|
|
|
|
--bash <($out/bin/${meta.mainProgram} completion bash) \
|
|
|
|
--fish <($out/bin/${meta.mainProgram} completion fish) \
|
|
|
|
--zsh <($out/bin/${meta.mainProgram} completion zsh)
|
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Security scanner that detects misconfigurations and vulnerabilities in build pipelines of repositories";
|
|
|
|
homepage = "https://github.com/boostsecurityio/poutine";
|
|
|
|
changelog = "https://github.com/boostsecurityio/poutine/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
mainProgram = "poutine";
|
|
|
|
};
|
|
|
|
}
|