anchor.diff:          ++ optionals imapSupport [ uwimap openssl pam ]
           ++ optionals curlSupport [ curl openssl ]
           ++ optionals ldapSupport [ openldap openssl ]
  -        ++ optionals gdSupport [ libpng libjpeg freetype ]
  +        ++ optionals gdSupport [ gd freetype libXpm libjpeg libpng libwebp ]
           ++ optionals opensslSupport [ openssl openssl.dev ]
           ++ optional apxs2Support apacheHttpd
           ++ optional (ldapSupport && stdenv.isLinux) cyrus_sasl
  
positive.code: # pcre functionality is tested in nixos/tests/php-pcre.nix
  { lib, stdenv, fetchurl, autoconf, bison, libtool, pkgconfig, re2c
  , libxml2, readline, zlib, curl, postgresql, gettext
  , openssl, pcre, pcre2, sqlite, config, libjpeg, libpng, freetype
  , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
  , uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
  , libzip, valgrind, oniguruma
  }:
  
  
negative.code:       ++ optional (mysqliSupport && mysqlndSupport) "--with-mysqli=mysqlnd"
        ++ optional (pdo_mysqlSupport || mysqliSupport) "--with-mysql-sock=/run/mysqld/mysqld.sock"
        ++ optional bcmathSupport "--enable-bcmath"
        ++ optionals (gdSupport && versionAtLeast version "7.4") [
          "--enable-gd"
          "--with-external-gd=${gd.dev}"
          "--with-webp=${libwebp}"
          "--with-jpeg=${libjpeg.dev}"
          "--with-xpm=${libXpm.dev}"
          "--with-freetype=${freetype.dev}"
          "--enable-gd-jis-conv"
        ] ++ optionals (gdSupport && versionOlder version "7.4") [
          "--with-gd=${gd.dev}"
          "--with-webp-dir=${libwebp}"
          "--with-jpeg-dir=${libjpeg.dev}"
          "--with-png-dir=${libpng.dev}"
          "--with-freetype-dir=${freetype.dev}"
          "--with-xpm-dir=${libXpm.dev}"
          "--enable-gd-jis-conv"
        ]
        ++ optional gmpSupport "--with-gmp=${gmp.dev}"
        ++ optional soapSupport "--enable-soap"
  