State of PHP before NixOS 20.09
Due to the lack of ability to do clever things like the python community does
withPackages to compose a package with the dependencies you need we
have defaulted to provide a huge default package to accommodate all needs.
We have been quite bad at accommodating all needs though…
I'm gonna give a few examples.
PHP in NixOS has defaulted to including for example the following modules:
… among many other modules. Some of these are quite convenient to get (such as database related extensions). But some of these are totally unreasonable to have as default in a distribution. But due to the nature of Nix and the lack of easily extending PHP we have just coped with having a huge distribution of PHP.
Also, at the same time we have lacked some other notable extensions in the
default build, such as
opcache, without recompiling PHP…
So users migrating from another distribution, for example anything based on Debian that defaults to having opcache enabled by default will see a drastic performance penalty by migrating to NixOS. This can be fixed by enabling the opcache flag for the build and recompile the entire PHP package. How fun…