depot/third_party/nixpkgs/pkgs/development/tools/conftest/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

41 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "conftest";
version = "0.25.0";
src = fetchFromGitHub {
owner = "open-policy-agent";
repo = "conftest";
rev = "v${version}";
sha256 = "sha256-pxPqBUOsXbP9giaV5NS3a6Z6auN4vUTIrIKcNh8xURU=";
};
vendorSha256 = "sha256-y8DRrthaUzMKxFbdbASvqsRMT+jex7jMJA6g7YF/VxI=";
doCheck = false;
buildFlagsArray = [
"-ldflags="
"-s"
"-w"
"-X github.com/open-policy-agent/conftest/internal/commands.version=${version}"
];
meta = with lib; {
description = "Write tests against structured configuration data";
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.
'';
inherit (src.meta) homepage;
license = licenses.asl20;
maintainers = with maintainers; [ yurrriq ];
};
}