3
0
Fork 0
forked from mirrors/nixpkgs

open-policy-agent: move to buildGoModule

Move from buildGoPackage to buildGoModule since opa is a go module.
This commit is contained in:
06kellyjac 2020-11-13 18:51:06 +00:00
parent c9845cdaed
commit 55be94fd28

View file

@ -1,10 +1,9 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:
buildGoPackage rec {
buildGoModule rec {
pname = "open-policy-agent";
version = "0.24.0";
goPackagePath = "github.com/open-policy-agent/opa";
src = fetchFromGitHub {
owner = "open-policy-agent";
repo = "opa";
@ -12,12 +11,14 @@ buildGoPackage rec {
sha256 = "0fv2rq8a01hapcpgfqp71v113iyyzs5w1sam14h9clyr1vqrbcf2";
};
vendorSha256 = null;
subPackages = [ "." ];
buildFlagsArray = ''
-ldflags=
-X ${goPackagePath}/version.Version=${version}
'';
buildFlagsArray = [
"-ldflags="
"-X github.com/open-policy-agent/opa/version.Version=${version}"
];
meta = with lib; {
description = "General-purpose policy engine";