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

47 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
2019-06-23 02:03:47 +00:00
buildGoModule rec {
pname = "conftest";
2021-09-22 03:13:19 +00:00
version = "0.28.1";
2019-06-23 02:03:47 +00:00
src = fetchFromGitHub {
2020-06-29 19:14:05 +00:00
owner = "open-policy-agent";
2019-06-23 02:03:47 +00:00
repo = "conftest";
rev = "v${version}";
2021-09-22 03:13:19 +00:00
sha256 = "sha256-o2P14Nsu77AXO+UnMBXthhP3Q7kI7nd/lI6GFE2cs3M=";
2019-06-23 02:03:47 +00:00
};
2021-09-22 03:13:19 +00:00
vendorSha256 = "sha256-zzckZI/n00BBl166S7uonJFNQ4RJGLCkDyfLRoHZOtA=";
2021-08-26 06:45:51 +00:00
ldflags = [
2020-10-04 13:54:37 +00:00
"-s"
"-w"
"-X github.com/open-policy-agent/conftest/internal/commands.version=${version}"
];
2019-06-23 02:03:47 +00:00
HOME = "$TMPDIR";
doInstallCheck = true;
installCheckPhase = ''
$out/bin/conftest --version | grep ${version} > /dev/null
'';
meta = with lib; {
2019-06-23 02:03:47 +00:00
description = "Write tests against structured configuration data";
downloadPage = "https://github.com/open-policy-agent/conftest";
homepage = "https://www.conftest.dev";
license = licenses.asl20;
2020-10-04 13:58:32 +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.
'';
maintainers = with maintainers; [ jk superherointj yurrriq ];
2019-06-23 02:03:47 +00:00
};
2020-06-29 19:14:05 +00:00
}