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.
This commit is contained in:
Francesco Gazzetta 2023-10-16 15:53:43 +02:00
parent 7cb9338b8f
commit 4a4991d33b

View File

@ -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