nixpkgs/pkgs/tools/security/threatest/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
990 B
Nix
Raw Normal View History

2022-11-24 11:21:02 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-05-19 16:04:55 +00:00
, installShellFiles
2022-11-24 11:21:02 +00:00
}:
buildGoModule rec {
pname = "threatest";
2023-08-18 22:22:09 +00:00
version = "1.2.4";
2022-11-24 11:21:02 +00:00
src = fetchFromGitHub {
owner = "DataDog";
repo = pname;
rev = "refs/tags/v${version}";
2023-08-18 22:22:09 +00:00
hash = "sha256-pCSSAEeVxi3/yK7B2g9ZZRU5TjdNd8qp+52Yc1HmxT8=";
2022-11-24 11:21:02 +00:00
};
2023-05-19 16:00:31 +00:00
proxyVendor = true;
2023-08-18 22:22:09 +00:00
vendorHash = "sha256-nHA+UJP6gYWdbTKFcxw1gI6X2ueTUIsHVBIlaprPwsQ=";
2022-11-24 11:21:02 +00:00
2023-05-19 16:04:55 +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-24 11:21:02 +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 ];
};
}