{ lib, php, debug ? false, enableBlackfire ? true, }: let inherit (builtins) compareVersions; inherit (lib) optionals; withBlackfire = enableBlackfire && !debug && ((compareVersions php.version "8.1.0") == 1); in { 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 ])