nixpkgs/pkgs/development/tools/conftest/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

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