2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "open-policy-agent";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "0.23.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/open-policy-agent/opa";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "open-policy-agent";
|
|
|
|
repo = "opa";
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "18hpanfrzg6xnq1g0yws6g0lw4y191pnrqphccv13j6kqk3k10ps";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/version.Version=${version}
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "General-purpose policy engine";
|
|
|
|
homepage = "https://www.openpolicyagent.org";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lewo ];
|
|
|
|
};
|
|
|
|
}
|