anchor.diff:          "--with-xpm=${libXpm.dev}"
           "--with-freetype=${freetype.dev}"
           "--enable-gd-jis-conv"
  -      ] ++ optionals (gdSupport && versionOlder version "7.4") [
  +      ] ++ lib.optionals (gdSupport && lib.versionOlder version "7.4") [
           "--with-gd=${gd.dev}"
           "--with-webp-dir=${libwebp}"
           "--with-jpeg-dir=${libjpeg.dev}"
  
positive.code:         "--with-xpm-dir=${libXpm.dev}"
          "--enable-gd-jis-conv"
        ]
        ++ optional gmpSupport "--with-gmp=${gmp.dev}"
        ++ optional soapSupport "--enable-soap"
        ++ optional socketsSupport "--enable-sockets"
        ++ optional opensslSupport "--with-openssl"
        ++ optional mbstringSupport "--enable-mbstring"
        ++ optional gettextSupport "--with-gettext=${gettext}"
        ++ optional intlSupport "--enable-intl"
        ++ optional exifSupport "--enable-exif"
        ++ optional xslSupport "--with-xsl=${libxslt.dev}"
        ++ optional bz2Support "--with-bz2=${bzip2.dev}"
        ++ optional (zipSupport && (versionOlder version "7.4")) "--enable-zip"
        ++ optional (zipSupport && (versionAtLeast version "7.4")) "--with-zip"
        ++ optional ftpSupport "--enable-ftp"
        ++ optional fpmSupport "--enable-fpm"
        ++ optional ztsSupport "--enable-maintainer-zts"
        ++ optional calendarSupport "--enable-calendar"
        ++ optional sodiumSupport "--with-sodium=${libsodium.dev}"
        ++ optional tidySupport "--with-tidy=${html-tidy}"
        ++ optional argon2Support "--with-password-argon2=${libargon2}"
        ++ optional (libzipSupport && (versionOlder version "7.4")) "--with-libzip=${libzip.dev}"
        ++ optional phpdbgSupport "--enable-phpdbg"
        ++ optional (!phpdbgSupport) "--disable-phpdbg"
        ++ optional (!cgiSupport) "--disable-cgi"
        ++ optional (!cliSupport) "--disable-cli"
        ++ optional (!pharSupport) "--disable-phar"
        ++ optional xmlrpcSupport "--with-xmlrpc"
        ++ optional cgotoSupport "--enable-re2c-cgoto"
        ++ optional valgrindSupport "--with-valgrind=${valgrind.dev}"
        ++ optional (!ipv6Support) "--disable-ipv6"
        ++ optional (pearSupport && libxml2Support) "--with-pear=$(out)/lib/php/pear";
  
      hardeningDisable = [ "bindnow" ];
  
  
negative.code:   , gmpSupport ? config.php.gmp or true
    , ztsSupport ? (config.php.zts or false) || (apxs2Support)
    , calendarSupport ? config.php.calendar or true
    , sodiumSupport ? (config.php.sodium or true) && (lib.versionAtLeast version "7.2")
    , tidySupport ? (config.php.tidy or false)
    , argon2Support ? (config.php.argon2 or true) && (lib.versionAtLeast version "7.2")
    , libzipSupport ? (config.php.libzip or true) && (lib.versionAtLeast version "7.2")
    , phpdbgSupport ? config.php.phpdbg or true
    , cgiSupport ? config.php.cgi or true
    , cliSupport ? config.php.cli or true
    , pharSupport ? config.php.phar or true
    , xmlrpcSupport ? (config.php.xmlrpc or false) && (libxml2Support)
    , cgotoSupport ? config.php.cgoto or false
    , valgrindSupport ? (config.php.valgrind or true) && (lib.versionAtLeast version "7.2")
    , ipv6Support ? config.php.ipv6 or true
    , pearSupport ? (config.php.pear or true) && (libxml2Support)
    }: stdenv.mkDerivation {
  