2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, installShellFiles
|
2022-11-27 09:42:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "threatest";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.2.4";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DataDog";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-pCSSAEeVxi3/yK7B2g9ZZRU5TjdNd8qp+52Yc1HmxT8=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
proxyVendor = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
vendorHash = "sha256-nHA+UJP6gYWdbTKFcxw1gI6X2ueTUIsHVBIlaprPwsQ=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd threatest \
|
|
|
|
--bash <($out/bin/threatest completion bash) \
|
|
|
|
--fish <($out/bin/threatest completion fish) \
|
|
|
|
--zsh <($out/bin/threatest completion zsh)
|
|
|
|
'';
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Framework for end-to-end testing threat detection rules";
|
|
|
|
homepage = "https://github.com/DataDog/threatest";
|
|
|
|
changelog = "https://github.com/DataDog/threatest/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|