1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00
haze/nix/image/php.nix

61 lines
1.2 KiB
Nix

{
lib,
php,
debug ? false,
}: let
inherit (builtins) compareVersions;
inherit (lib) optionals;
withBlackfire = !debug && ((compareVersions php.version "8.1.0") == 1);
in
php.buildEnv {
extensions = {
enabled,
all,
}:
enabled
++ (with all;
[
xdebug
excimer
inotify
redis
oci8
zip
pdo
pdo_pgsql
pdo_sqlite
pdo_mysql
pgsql
intl
curl
mbstring
pcntl
ldap
exif
gmp
apcu
ffi
]
++ optionals (!debug) [
smbclient # this breaks the build for no apparent reason
]
++ optionals withBlackfire [
blackfire
]);
extraConfig = ''
xdebug.mode=debug,trace,profile
xdebug.start_with_request=trigger
xdebug.discover_client_host=false
xdebug.client_host=hazehost
xdebug.log_level=0
xdebug.output_dir=/tmp/xdebug
memory_limit=512M
post_max_size 10G
upload_max_filesize 10G
apc.enable_cli=1
opcache.enable_cli=1
'';
}