2020-03-27 08:33:21 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2019-06-23 04:03:47 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "conftest";
|
2021-01-09 11:49:30 +01:00
|
|
|
version = "0.23.0";
|
2019-09-18 23:59:36 +02:00
|
|
|
|
2019-06-23 04:03:47 +02:00
|
|
|
src = fetchFromGitHub {
|
2020-06-29 21:14:05 +02:00
|
|
|
owner = "open-policy-agent";
|
2019-06-23 04:03:47 +02:00
|
|
|
repo = "conftest";
|
|
|
|
rev = "v${version}";
|
2021-01-09 11:49:30 +01:00
|
|
|
sha256 = "sha256-mSiZjpsFZfkM522f1WcJgBexiBS0o3uf1g94pjhgGVU=";
|
2019-06-23 04:03:47 +02:00
|
|
|
};
|
|
|
|
|
2021-01-09 11:49:30 +01:00
|
|
|
vendorSha256 = "sha256-iCIuEvwkbfBZ858yZZyVf5om6YLsGKRvzFmYzJBrRf4=";
|
2019-09-10 21:15:34 +02:00
|
|
|
|
2020-08-04 02:26:27 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-10-04 15:54:37 +02:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags="
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/open-policy-agent/conftest/internal/commands.version=${version}"
|
|
|
|
];
|
2019-06-23 04:03:47 +02:00
|
|
|
|
2020-03-27 08:33:21 +01:00
|
|
|
meta = with lib; {
|
2019-06-23 04:03:47 +02:00
|
|
|
description = "Write tests against structured configuration data";
|
2020-10-04 15:58:32 +02: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-06-29 21:14:05 +02:00
|
|
|
inherit (src.meta) homepage;
|
2019-06-23 04:03:47 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ yurrriq ];
|
|
|
|
};
|
2020-06-29 21:14:05 +02:00
|
|
|
}
|