From a4cf20c68f81e331bd663fa4cb3d381145de501f Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 1 Dec 2019 09:50:51 +0100 Subject: [PATCH] php74: Go through configuration options --- pkgs/development/interpreters/php/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 97d5c0aabe8d..a58025c42ac8 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -115,7 +115,8 @@ let "--with-config-file-scan-dir=/etc/php.d" ] ++ optional (versionOlder version "7.3") "--with-pcre-regex=${pcre.dev} PCRE_LIBDIR=${pcre}" - ++ optional (versionAtLeast version "7.3") "--with-pcre-regex=${pcre2.dev} PCRE_LIBDIR=${pcre2}" + ++ optional (versions.majorMinor version == "7.3") "--with-pcre-regex=${pcre2.dev} PCRE_LIBDIR=${pcre2}" + ++ optional (versionAtLeast version "7.4") "--with-external-pcre=${pcre2.dev} PCRE_LIBDIR=${pcre2}" ++ optional stdenv.isDarwin "--with-iconv=${libiconv}" ++ optional withSystemd "--with-fpm-systemd" ++ optionals imapSupport [ @@ -134,10 +135,11 @@ let ++ optional mhashSupport "--with-mhash" ++ optional curlSupport "--with-curl=${curl.dev}" ++ optional zlibSupport "--with-zlib=${zlib.dev}" - ++ optional libxml2Support "--with-libxml-dir=${libxml2.dev}" + ++ optional (libxml2Support && (versionOlder version "7.4")) "--with-libxml-dir=${libxml2.dev}" ++ optional (!libxml2Support) [ "--disable-dom" "--disable-libxml" + (if (versionOlder version "7.4") then "--disable-libxml" else "--without-libxml") "--disable-simplexml" "--disable-xml" "--disable-xmlreader" @@ -157,7 +159,12 @@ let ++ optional ( pdo_mysqlSupport || mysqliSupport ) "--with-mysql-sock=/run/mysqld/mysqld.sock" ++ optional bcmathSupport "--enable-bcmath" # FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108. - ++ optionals gdSupport [ + ++ optionals (gdSupport && versionAtLeast version "7.4") [ + "--enable-gd" + "--with-jpeg=${libjpeg.dev}" + "--with-freetype=${freetype.dev}" + "--enable-gd-jis-conv" + ] ++ optionals (gdSupport && versionOlder version "7.4") [ "--with-gd" "--with-freetype-dir=${freetype.dev}" "--with-png-dir=${libpng.dev}" @@ -174,7 +181,7 @@ let ++ optional xslSupport "--with-xsl=${libxslt.dev}" ++ optional mcryptSupport "--with-mcrypt=${libmcrypt'}" ++ optional bz2Support "--with-bz2=${bzip2.dev}" - ++ optional zipSupport "--enable-zip" + ++ optional (zipSupport && (versionOlder version "7.4")) "--enable-zip" ++ optional ftpSupport "--enable-ftp" ++ optional fpmSupport "--enable-fpm" ++ optional ztsSupport "--enable-maintainer-zts" @@ -182,7 +189,7 @@ let ++ optional sodiumSupport "--with-sodium=${libsodium.dev}" ++ optional tidySupport "--with-tidy=${html-tidy}" ++ optional argon2Support "--with-password-argon2=${libargon2}" - ++ optional libzipSupport "--with-libzip=${libzip.dev}" + ++ optional (libzipSupport && (versionOlder version "7.4")) "--with-libzip=${libzip.dev}" ++ optional phpdbgSupport "--enable-phpdbg" ++ optional (!phpdbgSupport) "--disable-phpdbg" ++ optional (!cgiSupport) "--disable-cgi"