From 4a4991d33bf221319af902952a0a25d70e2385c8 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Mon, 16 Oct 2023 15:53:43 +0200 Subject: [PATCH] phpExtensions.opcache: use valgrind only where supported opcache is a default extension, so this fixes eval of php on platforms where valgrind is not supported, such as risc-v. --- pkgs/top-level/php-packages.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index f60ae14cf585..cf73f7156ffd 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -440,9 +440,10 @@ lib.makeScope pkgs.newScope (self: with self; { } { name = "opcache"; - buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [ - valgrind.dev - ]; + buildInputs = [ pcre2 ] ++ + lib.optional + (!stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind) + valgrind.dev; zendExtension = true; postPatch = lib.optionalString stdenv.isDarwin '' # Tests are flaky on darwin