2019-11-08 12:47:13 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "open-policy-agent";
|
2020-10-13 23:02:10 +01:00
|
|
|
version = "0.24.0";
|
2019-11-08 12:47:13 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/open-policy-agent/opa";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "open-policy-agent";
|
|
|
|
repo = "opa";
|
|
|
|
rev = "v${version}";
|
2020-10-13 23:02:10 +01:00
|
|
|
sha256 = "0fv2rq8a01hapcpgfqp71v113iyyzs5w1sam14h9clyr1vqrbcf2";
|
2019-11-08 12:47:13 +00:00
|
|
|
};
|
|
|
|
|
2020-10-13 23:00:46 +01:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2020-07-25 20:30:12 +01:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/version.Version=${version}
|
|
|
|
'';
|
|
|
|
|
2019-11-08 12:47:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "General-purpose policy engine";
|
|
|
|
homepage = "https://www.openpolicyagent.org";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lewo ];
|
|
|
|
};
|
|
|
|
}
|