diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 9ba2e21305a..6394add9483 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -986,7 +986,7 @@ in # The configure script doesn't correctly add library link # flags, so we add them to the variable used by the Makefile # when linking. - MYSQLND_SHARED_LIBADD = "-lssl -lcrypto -lz"; + MYSQLND_SHARED_LIBADD = "-lssl -lcrypto"; # The configure script builds a config.h which is never # included. Let's include it in the main header file # included by all .c-files. @@ -1002,6 +1002,18 @@ in +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | '') + (pkgs.writeText "mysqlnd_fix_compression.patch" '' + --- a/ext/mysqlnd/mysqlnd.h + +++ b/ext/mysqlnd/mysqlnd.h + @@ -48,7 +48,7 @@ + #define MYSQLND_DBG_ENABLED 0 + #endif + + -#if defined(MYSQLND_COMPRESSION_WANTED) && defined(HAVE_ZLIB) + +#if defined(MYSQLND_COMPRESSION_WANTED) + #define MYSQLND_COMPRESSION_ENABLED 1 + #endif + '') ]; postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") '' substituteInPlace configure --replace '$OPENSSL_LIBDIR' '${openssl}/lib' \