diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2023-10-16 15:53:43 +0200 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2023-10-16 15:53:45 +0200 |
commit | 4a4991d33bf221319af902952a0a25d70e2385c8 (patch) | |
tree | 455a5c0d4001691e9d4ea2e23e8a45faa2a6daf0 | |
parent | 7cb9338b8fa29b159312bbfdaf0363185f87f988 (diff) |
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.
-rw-r--r-- | pkgs/top-level/php-packages.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index f60ae14cf585f..cf73f7156ffd3 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 |