Php extensions not work on nix

Question:
Why i can’t configure right php extension?
I install all deps but for a reason that i not see, the php modules are not there
Repl link:
https://replit.com/@delirial/BreakableHandyGlitch#replit.nix

{pkgs}:
let
  php = pkgs.php82.withExtensions(
    { all, ...}: with all ; ([mongodb])
  );
  in {
	deps = [
    hello
    php
    pkgs.php82Packages.composer
    pkgs.php82Extensions.mongodb
    pkgs.php82Extensions.intl
    pkgs.php82Extensions.xsl
    pkgs.php82Extensions.amqp
    pkgs.php82Extensions.gd
    pkgs.php82Extensions.openssl
    pkgs.symfony-cli
    pkgs.mongodb
    pkgs.yarn
    pkgs.nodejs
	];

I didn’t know why works now, with this code

{ pkgs,... }: 
  let
  php = pkgs.php82.withExtensions(
    { all, enabled }: enabled ++ (with all; ([
      mongodb
      intl
      amqp
      gd
      openssl
      opcache
      iconv
    ]))
  );
  in {
	deps = [
    php
    pkgs.php82Packages.composer
    pkgs.php82Extensions.mongodb
    pkgs.php82Extensions.intl
    pkgs.php82Extensions.amqp
    pkgs.php82Extensions.gd
    pkgs.php82Extensions.openssl
    pkgs.symfony-cli
    pkgs.mongodb
    pkgs.yarn
    pkgs.nodejs
	];
}

Surely, i missing something in my mental model, if anyone could iluminate me , i will be gratefull for the rest of my days. :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.