···203203 # This is a set of PHP extensions meant to be used in php.buildEnv
204204 # or php.withExtensions to extend the functionality of the PHP
205205 # interpreter.
206206- extensions = {
206206+ # The extensions attributes is composed of three sections:
207207+ # 1. The contrib conditional extensions, which are only available on specific versions or system
208208+ # 2. The contrib extensions available
209209+ # 3. The core extensions
210210+ extensions =
211211+ # Contrib conditional extensions
212212+ lib.optionalAttrs (!(lib.versionAtLeast php.version "8.3")) {
213213+ blackfire = callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
214214+ } // lib.optionalAttrs (!stdenv.isDarwin) {
215215+ # Only available on Linux: https://www.php.net/manual/en/inotify.requirements.php
216216+ inotify = callPackage ../development/php-packages/inotify { };
217217+ } //
218218+ # Contrib extensions
219219+ {
207220 amqp = callPackage ../development/php-packages/amqp { };
208221209222 apcu = callPackage ../development/php-packages/apcu { };
···225238 igbinary = callPackage ../development/php-packages/igbinary { };
226239227240 imagick = callPackage ../development/php-packages/imagick { };
228228-229229- inotify = callPackage ../development/php-packages/inotify { };
230241231242 mailparse = callPackage ../development/php-packages/mailparse { };
232243···292303293304 yaml = callPackage ../development/php-packages/yaml { };
294305 } // (
306306+ # Core extensions
295307 let
296308 # This list contains build instructions for different modules that one may
297309 # want to build.
···637649 # Produce the final attribute set of all extensions defined.
638650 in
639651 builtins.listToAttrs namedExtensions
640640- ) // lib.optionalAttrs (!(lib.versionAtLeast php.version "8.3")) {
641641- blackfire = callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
642642- };
652652+ );
643653})