From be197dd7c611385e0f7f9f16c7712a0aa39fb225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Jul 2024 14:53:44 +0200 Subject: [PATCH] open-policy-agent: fix build against go 1.22.5 --- pkgs/development/tools/open-policy-agent/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/tools/open-policy-agent/default.nix b/pkgs/development/tools/open-policy-agent/default.nix index 06161d95c4b2..891733635cce 100644 --- a/pkgs/development/tools/open-policy-agent/default.nix +++ b/pkgs/development/tools/open-policy-agent/default.nix @@ -2,6 +2,7 @@ , stdenv , buildGoModule , fetchFromGitHub +, fetchpatch , installShellFiles , enableWasmEval ? false @@ -20,6 +21,15 @@ buildGoModule rec { hash = "sha256-fx7k6KvL0uy2NXLDLpCnN1ux9MGEO1CbX6TdLweVzag="; }; + patches = [ + # fix tests in 1.22.5 + # https://github.com/open-policy-agent/opa/pull/6845 + (fetchpatch { + url = "https://github.com/open-policy-agent/opa/commit/956358516c23b1f33f6667961e20aca65b91355b.patch"; + hash = "sha256-1nfMwJwbYfdLg9j4ppP1IWdDeFq6vhXcDKr6uprP53U="; + }) + ]; + vendorHash = null; nativeBuildInputs = [ installShellFiles ];