commit
d5c9e8e80a
|
@ -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 ]))
|
|
@ -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
|
|
@ -198,7 +198,8 @@ let
|
||||||
++ lib.optional (!ipv6Support) "--disable-ipv6"
|
++ lib.optional (!ipv6Support) "--disable-ipv6"
|
||||||
++ lib.optional systemdSupport "--with-fpm-systemd"
|
++ lib.optional systemdSupport "--with-fpm-systemd"
|
||||||
++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}"
|
++ 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
|
# Sendmail
|
||||||
|
|
|
@ -14,9 +14,10 @@ buildPecl {
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = [ "--with-couchbase" ];
|
configureFlags = [ "--with-couchbase" ];
|
||||||
|
broken = lib.versionAtLeast php.version "8.0";
|
||||||
|
|
||||||
buildInputs = with pkgs; [ libcouchbase zlib ];
|
buildInputs = with pkgs; [ libcouchbase zlib ];
|
||||||
internalDeps = [ php.extensions.json ];
|
internalDeps = [] ++ lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
|
||||||
peclDeps = [ php.extensions.igbinary ];
|
peclDeps = [ php.extensions.igbinary ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ buildPecl, lib, pkgs, pcre' }:
|
{ buildPecl, fetchpatch, lib, pkgs, pcre' }:
|
||||||
|
|
||||||
buildPecl {
|
buildPecl {
|
||||||
pname = "imagick";
|
pname = "imagick";
|
||||||
|
@ -6,6 +6,14 @@ buildPecl {
|
||||||
version = "3.4.4";
|
version = "3.4.4";
|
||||||
sha256 = "0xvhaqny1v796ywx83w7jyjyd0nrxkxf34w9zi8qc8aw8qbammcd";
|
sha256 = "0xvhaqny1v796ywx83w7jyjyd0nrxkxf34w9zi8qc8aw8qbammcd";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix compatibility with PHP 8.
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/Imagick/imagick/pull/336.patch";
|
||||||
|
sha256 = "nuRdh02qaMx0s/5OzlfWjyYgZG1zgrYnAjsZ/UVIrUM=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [ "--with-imagick=${pkgs.imagemagick.dev}" ];
|
configureFlags = [ "--with-imagick=${pkgs.imagemagick.dev}" ];
|
||||||
nativeBuildInputs = [ pkgs.pkgconfig ];
|
nativeBuildInputs = [ pkgs.pkgconfig ];
|
||||||
buildInputs = [ pcre' ];
|
buildInputs = [ pcre' ];
|
||||||
|
|
|
@ -7,8 +7,9 @@ buildPecl {
|
||||||
sha256 = "1cfsbxf3q3im0cmalgk76jpz581zr92z03c1viy93jxb53k2vsgl";
|
sha256 = "1cfsbxf3q3im0cmalgk76jpz581zr92z03c1viy93jxb53k2vsgl";
|
||||||
|
|
||||||
internalDeps = with php.extensions; [
|
internalDeps = with php.extensions; [
|
||||||
json
|
|
||||||
session
|
session
|
||||||
|
] ++ lib.optionals (lib.versionOlder php.version "8.0") [
|
||||||
|
json
|
||||||
] ++ lib.optionals (lib.versionOlder php.version "7.4") [
|
] ++ lib.optionals (lib.versionOlder php.version "7.4") [
|
||||||
hash
|
hash
|
||||||
];
|
];
|
||||||
|
|
|
@ -10492,6 +10492,12 @@ in
|
||||||
phpExtensions = php74Extensions;
|
phpExtensions = php74Extensions;
|
||||||
phpPackages = php74Packages;
|
phpPackages = php74Packages;
|
||||||
|
|
||||||
|
php80 = callPackage ../development/interpreters/php/8.0.nix {
|
||||||
|
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
||||||
|
};
|
||||||
|
php80Extensions = recurseIntoAttrs php80.extensions;
|
||||||
|
php80Packages = recurseIntoAttrs php80.packages;
|
||||||
|
|
||||||
# Import PHP74 interpreter, extensions and packages
|
# Import PHP74 interpreter, extensions and packages
|
||||||
php74 = callPackage ../development/interpreters/php/7.4.nix {
|
php74 = callPackage ../development/interpreters/php/7.4.nix {
|
||||||
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, html-tidy, libzip, zlib, pcre, pcre2, libxslt, aspell, openldap, cyrus_sasl
|
, html-tidy, libzip, zlib, pcre, pcre2, libxslt, aspell, openldap, cyrus_sasl
|
||||||
, uwimap, pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng
|
, uwimap, pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng
|
||||||
, freetype, libffi, freetds, postgresql, sqlite, net-snmp, unixODBC, libedit
|
, freetype, libffi, freetds, postgresql, sqlite, net-snmp, unixODBC, libedit
|
||||||
, readline, rsync, fetchpatch
|
, readline, rsync, fetchpatch, valgrind
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -331,7 +331,7 @@ in
|
||||||
sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4";
|
sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
{ name = "json"; }
|
{ name = "json"; enable = lib.versionOlder php.version "8.0"; }
|
||||||
{ name = "ldap";
|
{ name = "ldap";
|
||||||
buildInputs = [ openldap cyrus_sasl ];
|
buildInputs = [ openldap cyrus_sasl ];
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
@ -341,7 +341,9 @@ in
|
||||||
"LDAP_LIBDIR=${openldap.out}/lib"
|
"LDAP_LIBDIR=${openldap.out}/lib"
|
||||||
] ++ lib.optional stdenv.isLinux "--with-ldap-sasl=${cyrus_sasl.dev}";
|
] ++ lib.optional stdenv.isLinux "--with-ldap-sasl=${cyrus_sasl.dev}";
|
||||||
doCheck = false; }
|
doCheck = false; }
|
||||||
{ name = "mbstring"; buildInputs = [ oniguruma ]; doCheck = false; }
|
{ name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
||||||
|
pcre'
|
||||||
|
]; doCheck = false; }
|
||||||
{ name = "mysqli";
|
{ name = "mysqli";
|
||||||
internalDeps = [ php.extensions.mysqlnd ];
|
internalDeps = [ php.extensions.mysqlnd ];
|
||||||
configureFlags = [ "--with-mysqli=mysqlnd" "--with-mysql-sock=/run/mysqld/mysqld.sock" ];
|
configureFlags = [ "--with-mysqli=mysqlnd" "--with-mysql-sock=/run/mysqld/mysqld.sock" ];
|
||||||
|
@ -388,11 +390,13 @@ in
|
||||||
# oci8 (7.4, 7.3, 7.2)
|
# oci8 (7.4, 7.3, 7.2)
|
||||||
# odbc (7.4, 7.3, 7.2)
|
# odbc (7.4, 7.3, 7.2)
|
||||||
{ name = "opcache";
|
{ name = "opcache";
|
||||||
buildInputs = [ pcre' ];
|
buildInputs = [ pcre' ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
||||||
|
valgrind.dev
|
||||||
|
];
|
||||||
# HAVE_OPCACHE_FILE_CACHE is defined in config.h, which is
|
# HAVE_OPCACHE_FILE_CACHE is defined in config.h, which is
|
||||||
# included from ZendAccelerator.h, but ZendAccelerator.h is
|
# included from ZendAccelerator.h, but ZendAccelerator.h is
|
||||||
# included after the ifdef...
|
# included after the ifdef...
|
||||||
patches = lib.optional (lib.versionOlder php.version "7.4") [
|
patches = [] ++ lib.optional (lib.versionAtLeast php.version "8.0") [ ../development/interpreters/php/fix-opcache-configure.patch ] ++lib.optional (lib.versionOlder php.version "7.4") [
|
||||||
(pkgs.writeText "zend_file_cache_config.patch" ''
|
(pkgs.writeText "zend_file_cache_config.patch" ''
|
||||||
--- a/ext/opcache/zend_file_cache.c
|
--- a/ext/opcache/zend_file_cache.c
|
||||||
+++ b/ext/opcache/zend_file_cache.c
|
+++ b/ext/opcache/zend_file_cache.c
|
||||||
|
@ -456,7 +460,7 @@ in
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
}
|
}
|
||||||
# recode (7.3, 7.2)
|
# recode (7.3, 7.2)
|
||||||
{ name = "session"; }
|
{ name = "session"; doCheck = !(lib.versionAtLeast php.version "8.0"); }
|
||||||
{ name = "shmop"; }
|
{ name = "shmop"; }
|
||||||
{ name = "simplexml";
|
{ name = "simplexml";
|
||||||
buildInputs = [ libxml2 pcre' ];
|
buildInputs = [ libxml2 pcre' ];
|
||||||
|
|
Loading…
Reference in New Issue