HAVE_ZLIB has to be defined in mysqlnd.h for compression support to be
turned on, but the configure script doesn't actually define it even
when zlib is available.
The couchbase extension depends on the igbinary PECL which needs to be
loaded and loaded prior to it. It also seems like the pcs extension
isn't actually needed - it at least builds and loads without it. Since
the pcs extension dependency was the reason couchbase didn't build on
PHP 7.4 it now does, so let's unmark it broken.
The pcs extension fails to load at runtime with PHP 7.3, so let's mark
it broken from 7.3 onwards. It also depends on the tokenizer internal
extension.
Fix an issue brought up in #86463, where the apcu_bc extension isn't
loaded correctly since it produces a .so with a different name than
the extension name. Also, the apcu extension has to be loaded and
loaded prior to loading this extension.
Instead of using two different php packages in php-packages.nix, one
wrapper and one unwrapped, simply use the wrapper and use its
"unwrapped" attribute when necessary. Also, get rid of the packages
and extensions attributes from the base package, since they're no
longer needed.
So now we have only packages for human interaction in php.packages and
only extensions in php.extensions. With this php.packages.exts have
been merged into the same attribute set as all the other extensions to
make it flat and nice.
The nextcloud module have been updated to reflect this change as well
as the documentation.
Fix extensions that were broken by the extension refactoring and
remove pthreads and pinba, which had asserts which broke evaluation,
were in need of refactoring and of dubious value.
Make mkExtension put headers in the dev output and use them, instead of
a different part of the current source tree, when referring to another
extension by using internalDeps.
This means external extensions can be built against the internal ones.
This means php packages can now refer to other php packages by looking
them up in the php.packages attribute and gets rid of the internal
recursive set previously defined in php-packages.nix. This also means
that in applications where previously both the php package and the
corresponding version of the phpPackages package set had to be
specified, the php package will now suffice.
This also adds the phpWithExtensions parameter to the
php-packages.nix, which can be used by extensions that need a fully
featured PHP executable.
A slight rewrite of buildEnv which:
1. Makes buildEnv recursively add itself to its output, so that it can
be accessed from any php derivation.
2. Orders the extension text strings according to their internalDeps
attribute - dependencies have to be put before dependants in the
php.ini or they will fail to load due to missing symbols.
The tests for many of the extensions run just fine, for some a small
portion fail. This runs the tests by default and disables the tests
extensions with any failing tests.
This moves yet more extensions from the base build to
phpPackages.ext. Some of the extensions are a bit quirky and need
patching for this to work, most notably mysqlnd and opcache.
Two new parameters are introduced for mkExtension - internalDeps and
postPhpize. internalDeps is used to specify which other internal
extensions the current extension depends on, in order to provide them
at build time. postPhpize is for when patches and quirks need to be
applied after running phpize.
Patch notes:
- For opcache, older versions of PHP have a bug where header files are
included in the wrong order.
- For mysqlnd, the config.h is never included, so we include it in the
main header file, mysqlnd.h. Also, the configure script doesn't add
the necessary library link flags, so we add them to the variable
configure should have added them to.
Initially discussed in #55460.
This patch adds a `buildEnv` function to `php` that has the
following features:
* `php.buildEnv { extraConfig = /* ... */; }` to specify custom
`php.ini` args for the CLI.
* `php.buildEnv { exts = phpPackages: [phpPackages.apcu] }` to
create a PHP interpreter for the CLI with the `apcu` extension.