I use PHP with specific version in my project, through a flake and direnv. In this project I want to use PHPActor as well, but the difference in built-in PHP version makes the PHPActor unusable. So I try to override the PHPActor’s PHP with my supplied PHP.
This extensions is important for the LSP itself as well as its subsystem (Psalm, PHP CS Fixer) to work properly.
My supplied PHP built like this:
let
php82_ = (pkgs.php82.withExtensions ({ enabled, all }: enabled ++ (with all; [
memcached
])));
# ...
I built the PHPActor on the next step like this:
phpactor_ = pkgs.callPackage "${toString pkgs.path}/pkgs/by-name/ph/phpactor/package.nix" {
php = php82_;
};
Apparently, the resulting phpactor uses PHP 8.2 version without any extension.
# See its version
less $(which phpactor)
/nix/store/<hash>-php-with-extensions-8.2.29/bin/php -m
[PHP Modules]
Core
date
hash
json
libxml
mbstring
pcre
Phar
random
Reflection
SPL
standard
xml
[Zend Modules]
As I understood, the php.withExtensions
uses passthru
attribute which is not part of its derivation. But I want to know exactly why.
Is there any way I can get a complete PHP derivation with its extension?