2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "conftest";
|
2021-08-11 14:56:57 +00:00
|
|
|
version = "0.27.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-07-18 16:06:22 +00:00
|
|
|
owner = "open-policy-agent";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "conftest";
|
|
|
|
rev = "v${version}";
|
2021-08-11 14:56:57 +00:00
|
|
|
sha256 = "sha256-Yc/aejGLMbAqpIRTVQQ3lv7/oyr7tVAy41Gx6198Eos=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-11 14:56:57 +00:00
|
|
|
vendorSha256 = "sha256-jI5bX6S2C0ckiiieVlaRNEsLS/5gGkC3o/xauDtCOjA=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags="
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/open-policy-agent/conftest/internal/commands.version=${version}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Write tests against structured configuration data";
|
2020-11-21 19:51:51 +00:00
|
|
|
longDescription = ''
|
|
|
|
Conftest helps you write tests against structured configuration data.
|
|
|
|
Using Conftest you can write tests for your Kubernetes configuration,
|
|
|
|
Tekton pipeline definitions, Terraform code, Serverless configs or any
|
|
|
|
other config files.
|
|
|
|
|
|
|
|
Conftest uses the Rego language from Open Policy Agent for writing the
|
|
|
|
assertions. You can read more about Rego in 'How do I write policies' in
|
|
|
|
the Open Policy Agent documentation.
|
|
|
|
'';
|
2020-07-18 16:06:22 +00:00
|
|
|
inherit (src.meta) homepage;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-08-05 21:33:18 +00:00
|
|
|
maintainers = with maintainers; [ yurrriq jk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
}
|