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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.2.5";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DataDog";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-rVRBrf/RTcHvKOLHNASzvij3fV+uQEuIVKb07CZ/cT0=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
proxyVendor = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-zwHcGy7wjy2yx7nMi88R+z+Is+YcqGRMK0czeBNlcdA=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|