about summary refs log tree commit diff
path: root/pkgs/development/interpreters/php
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2019-12-10 20:34:06 +0300
committerIzorkin <izorkin@elven.pw>2020-02-22 11:22:05 +0300
commit0ee5d55d3b3a014dba4a76e52901e638387c3ba0 (patch)
tree8c47a10717761a5ae67578dc126f33232d2e236e /pkgs/development/interpreters/php
parentac3c11a980a2e9c0ce69eba8b6c10f10190180ee (diff)
downloadnixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar.gz
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar.bz2
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar.lz
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar.xz
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.tar.zst
nixlib-0ee5d55d3b3a014dba4a76e52901e638387c3ba0.zip
php: use external GD library
Diffstat (limited to 'pkgs/development/interpreters/php')
-rw-r--r--pkgs/development/interpreters/php/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index e62d461b5c7a..73fb29a5c864 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -1,9 +1,10 @@
 # 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
+, openssl, pcre, pcre2, sqlite, config
 , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
 , uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
+, gd, freetype, libXpm, libjpeg, libpng, libwebp
 , libzip, valgrind, oniguruma
 }:
 
@@ -84,7 +85,7 @@ let
         ++ 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
@@ -155,17 +156,22 @@ let
       ++ optional (mysqliSupport && mysqlndSupport) "--with-mysqli=mysqlnd"
       ++ 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 && 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"
-        "--with-freetype-dir=${freetype.dev}"
-        "--with-png-dir=${libpng.dev}"
+        "--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"