aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/interpreters/php
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/php')
-rw-r--r--pkgs/development/interpreters/php/7.3.nix4
-rw-r--r--pkgs/development/interpreters/php/7.4.nix4
-rw-r--r--pkgs/development/interpreters/php/8.0.nix17
-rw-r--r--pkgs/development/interpreters/php/fix-opcache-configure.patch81
-rw-r--r--pkgs/development/interpreters/php/generic.nix7
5 files changed, 108 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/php/7.3.nix b/pkgs/development/interpreters/php/7.3.nix
index 832a8323d58b..30e26bf87a1b 100644
--- a/pkgs/development/interpreters/php/7.3.nix
+++ b/pkgs/development/interpreters/php/7.3.nix
@@ -4,8 +4,8 @@ let
generic = (import ./generic.nix) _args;
base = callPackage generic (_args // {
- version = "7.3.24";
- sha256 = "1655rj4w63n5fkvdj3kz9f5jfyjgvzw8a6j8zkzgic1p42xszdsm";
+ version = "7.3.25";
+ sha256 = "1yq2fwpg9jgcafcrq4ffqm52r0f80pi6zy7fj1yb1qwim96mlcb9";
# https://bugs.php.net/bug.php?id=76826
extraPatches = lib.optional stdenv.isDarwin ./php73-darwin-isfinite.patch;
diff --git a/pkgs/development/interpreters/php/7.4.nix b/pkgs/development/interpreters/php/7.4.nix
index 571c7af8fc69..b45da1fb86cb 100644
--- a/pkgs/development/interpreters/php/7.4.nix
+++ b/pkgs/development/interpreters/php/7.4.nix
@@ -4,8 +4,8 @@ let
generic = (import ./generic.nix) _args;
base = callPackage generic (_args // {
- version = "7.4.12";
- sha256 = "0rwrl7xgfq2bbgmy34klgfsqa7v935074ibanmic9pwy4g676vvf";
+ version = "7.4.13";
+ sha256 = "1nhzldjp8jfd1hivfyn5wydim5daibz0vkfxgys2xj8igs2kk8qm";
});
in base.withExtensions ({ all, ... }: with all; ([
diff --git a/pkgs/development/interpreters/php/8.0.nix b/pkgs/development/interpreters/php/8.0.nix
new file mode 100644
index 000000000000..ded661e55853
--- /dev/null
+++ b/pkgs/development/interpreters/php/8.0.nix
@@ -0,0 +1,17 @@
+{ callPackage, lib, stdenv, nixosTests, ... }@_args:
+
+let
+ generic = (import ./generic.nix) _args;
+
+ base = callPackage generic (_args // {
+ version = "8.0.0";
+ sha256 = "02cx3gvxqvkllp54jfvs83kl8bmpcqyzp9jf1d0l9x5bgv1jv0sy";
+ });
+
+in base.withExtensions ({ all, ... }: with all; ([
+ bcmath calendar curl ctype dom exif fileinfo filter ftp gd
+ gettext gmp iconv intl ldap mbstring mysqli mysqlnd opcache
+ openssl pcntl pdo pdo_mysql pdo_odbc pdo_pgsql pdo_sqlite pgsql
+ posix readline session simplexml sockets soap sodium sqlite3
+ tokenizer xmlreader xmlwriter zip zlib
+] ++ lib.optionals (!stdenv.isDarwin) [ imap ]))
diff --git a/pkgs/development/interpreters/php/fix-opcache-configure.patch b/pkgs/development/interpreters/php/fix-opcache-configure.patch
new file mode 100644
index 000000000000..e67d2cc7bc79
--- /dev/null
+++ b/pkgs/development/interpreters/php/fix-opcache-configure.patch
@@ -0,0 +1,81 @@
+diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
+index 726188597496..781e51d3e44c 100644
+--- a/Zend/Zend.m4
++++ b/Zend/Zend.m4
+@@ -190,12 +190,6 @@ dnl LIBZEND_OTHER_CHECKS
+ dnl
+ AC_DEFUN([LIBZEND_OTHER_CHECKS],[
+
+-AC_ARG_ENABLE([zts],
+- [AS_HELP_STRING([--enable-zts],
+- [Enable thread safety])],
+- [ZEND_ZTS=$enableval],
+- [ZEND_ZTS=no])
+-
+ AC_MSG_CHECKING(whether to enable thread-safety)
+ AC_MSG_RESULT($ZEND_ZTS)
+
+diff --git a/configure.ac b/configure.ac
+index 8d6e922fa9bf..e07a75d19ac7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -797,6 +797,19 @@ if test "$PHP_DEBUG_ASSERTIONS" = "yes"; then
+ ZEND_DEBUG=yes
+ fi
+
++AC_ARG_ENABLE([zts],
++ [AS_HELP_STRING([--enable-zts],
++ [Enable thread safety])],
++ [ZEND_ZTS=$enableval],
++ [ZEND_ZTS=no])
++
++if test "$ZEND_ZTS" = "yes"; then
++ AC_DEFINE(ZTS, 1,[ ])
++ PHP_THREAD_SAFETY=yes
++else
++ PHP_THREAD_SAFETY=no
++fi
++
+ PHP_ARG_ENABLE([rtld-now],
+ [whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY],
+ [AS_HELP_STRING([--enable-rtld-now],
+@@ -1136,13 +1149,6 @@ LIBZEND_BASIC_CHECKS
+ LIBZEND_DLSYM_CHECK
+ LIBZEND_OTHER_CHECKS
+
+-if test "$ZEND_ZTS" = "yes"; then
+- AC_DEFINE(ZTS,1,[ ])
+- PHP_THREAD_SAFETY=yes
+-else
+- PHP_THREAD_SAFETY=no
+-fi
+-
+ INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
+ INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
+
+diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
+index 054cd28c0247..93d72fb73d19 100644
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -66,7 +66,7 @@ if test "$PHP_OPCACHE" != "no"; then
+ esac
+ fi
+
+- if test "$enable_zts" = "yes"; then
++ if test "$PHP_THREAD_SAFETY" = "yes"; then
+ DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+ fi
+
+diff --git a/ext/session/config.m4 b/ext/session/config.m4
+index 7abc8813b72a..da31bbde86cc 100644
+--- a/ext/session/config.m4
++++ b/ext/session/config.m4
+@@ -31,7 +31,7 @@ if test "$PHP_MM" != "no"; then
+ AC_MSG_ERROR(cannot find mm library)
+ fi
+
+- if test "$enable_zts" = "yes"; then
++ if test "$PHP_THREAD_SAFETY" = "yes"; then
+ dnl The mm library is not thread-safe, and mod_mm.c refuses to compile.
+ AC_MSG_ERROR(--with-mm cannot be combined with --enable-zts)
+ fi \ No newline at end of file
diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix
index ef50eacc5fca..4a96abcf9b69 100644
--- a/pkgs/development/interpreters/php/generic.nix
+++ b/pkgs/development/interpreters/php/generic.nix
@@ -126,6 +126,10 @@ let
if test -e $out/bin/php-fpm; then
wrapProgram $out/bin/php-fpm --set PHP_INI_SCAN_DIR $out/lib
fi
+
+ if test -e $out/bin/phpdbg; then
+ wrapProgram $out/bin/phpdbg --set PHP_INI_SCAN_DIR $out/lib
+ fi
'';
};
in
@@ -194,7 +198,8 @@ let
++ lib.optional (!ipv6Support) "--disable-ipv6"
++ lib.optional systemdSupport "--with-fpm-systemd"
++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}"
- ++ lib.optional ztsSupport "--enable-maintainer-zts"
+ ++ lib.optional (ztsSupport && (lib.versionOlder version "8.0")) "--enable-maintainer-zts"
+ ++ lib.optional (ztsSupport && (lib.versionAtLeast version "8.0")) "--enable-zts"
# Sendmail