open-policy-agent: 0.26.0 -> 0.27.0

Set buildFlagsArray using bash
use -s and -w to minify the result
Add installCheckPhase
Add @06kellyjac as a maintainer
This commit is contained in:
06kellyjac 2021-03-09 17:51:14 +00:00
parent 8d327040c0
commit cfac8936f0

View File

@ -2,23 +2,30 @@
buildGoModule rec { buildGoModule rec {
pname = "open-policy-agent"; pname = "open-policy-agent";
version = "0.26.0"; version = "0.27.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "open-policy-agent"; owner = "open-policy-agent";
repo = "opa"; repo = "opa";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-bkWfRmcUPNYeUucrbh9xAqmLg7RxEEQGa2DQdN2S6Po="; sha256 = "sha256-WMCd7+SUpKagoutBqI98KnoOd/UwJqFrSh0RAJQvuSo=";
}; };
vendorSha256 = null; vendorSha256 = null;
subPackages = [ "." ]; subPackages = [ "." ];
buildFlagsArray = [ preBuild = ''
"-ldflags=" buildFlagsArray+=("-ldflags" "-s -w -X github.com/open-policy-agent/opa/version.Version=${version}")
"-X github.com/open-policy-agent/opa/version.Version=${version}" '';
];
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/opa --help
$out/bin/opa version | grep "Version: ${version}"
runHook postInstallCheck
'';
meta = with lib; { meta = with lib; {
description = "General-purpose policy engine"; description = "General-purpose policy engine";
@ -30,6 +37,6 @@ buildGoModule rec {
''; '';
homepage = "https://www.openpolicyagent.org"; homepage = "https://www.openpolicyagent.org";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ lewo ]; maintainers = with maintainers; [ lewo jk ];
}; };
} }