php83: init at 8.3.0alpha2 (#239151)
* php83: init at 8.3.0alpha2 * phpExtensions.blackfire: disable for php 8.3 * phpExtensions.apcu: patch for 8.3 only
This commit is contained in:
parent
7f8a16b9f5
commit
5f85fe1e8a
6 changed files with 126 additions and 23 deletions
|
@ -597,6 +597,7 @@ in {
|
||||||
php = handleTest ./php {};
|
php = handleTest ./php {};
|
||||||
php81 = handleTest ./php { php = pkgs.php81; };
|
php81 = handleTest ./php { php = pkgs.php81; };
|
||||||
php82 = handleTest ./php { php = pkgs.php82; };
|
php82 = handleTest ./php { php = pkgs.php82; };
|
||||||
|
php83 = handleTest ./php { php = pkgs.php83; };
|
||||||
phylactery = handleTest ./web-apps/phylactery.nix {};
|
phylactery = handleTest ./web-apps/phylactery.nix {};
|
||||||
pict-rs = handleTest ./pict-rs.nix {};
|
pict-rs = handleTest ./pict-rs.nix {};
|
||||||
pinnwand = handleTest ./pinnwand.nix {};
|
pinnwand = handleTest ./pinnwand.nix {};
|
||||||
|
|
57
pkgs/development/interpreters/php/8.3.nix
Normal file
57
pkgs/development/interpreters/php/8.3.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{ callPackage, fetchurl, ... }@_args:
|
||||||
|
|
||||||
|
let
|
||||||
|
base = (callPackage ./generic.nix (_args // {
|
||||||
|
version = "8.3.0alpha2";
|
||||||
|
hash = null;
|
||||||
|
})).overrideAttrs (oldAttrs: {
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://downloads.php.net/~eric/php-8.3.0alpha2.tar.xz";
|
||||||
|
hash = "sha256-YLCxgiDcsBisOmAodf0h8HyaCIh+4i1Q7QZw/h4KR5I=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in
|
||||||
|
base.withExtensions ({ all, ... }: with all; ([
|
||||||
|
bcmath
|
||||||
|
calendar
|
||||||
|
curl
|
||||||
|
ctype
|
||||||
|
dom
|
||||||
|
exif
|
||||||
|
fileinfo
|
||||||
|
filter
|
||||||
|
ftp
|
||||||
|
gd
|
||||||
|
gettext
|
||||||
|
gmp
|
||||||
|
iconv
|
||||||
|
imap
|
||||||
|
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
|
||||||
|
sysvsem
|
||||||
|
sqlite3
|
||||||
|
tokenizer
|
||||||
|
xmlreader
|
||||||
|
xmlwriter
|
||||||
|
zip
|
||||||
|
zlib
|
||||||
|
]))
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
|
||||||
|
index a6f3e64db6..c3047233db 100644
|
||||||
|
--- a/ext/fileinfo/fileinfo.c
|
||||||
|
+++ b/ext/fileinfo/fileinfo.c
|
||||||
|
@@ -14,6 +14,9 @@
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifdef HAVE_CONFIG_H
|
||||||
|
+#include "config.h"
|
||||||
|
+#endif
|
||||||
|
#include "php.h"
|
||||||
|
|
||||||
|
#include "libmagic/magic.h"
|
|
@ -1,4 +1,4 @@
|
||||||
{ buildPecl, lib, pcre2, fetchFromGitHub }:
|
{ buildPecl, lib, pcre2, fetchFromGitHub, php, fetchpatch }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "5.1.22";
|
version = "5.1.22";
|
||||||
|
@ -13,6 +13,13 @@ in buildPecl {
|
||||||
sha256 = "sha256-L4a+/kWT95a1Km+FzFNiAaBw8enU6k4ZiCFRErjj9o8=";
|
sha256 = "sha256-L4a+/kWT95a1Km+FzFNiAaBw8enU6k4ZiCFRErjj9o8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = lib.optionals (lib.versionAtLeast php.version "8.3") [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/krakjoe/apcu/commit/c9a29161c68c0faf71046e8f03f6a90900023ded.patch";
|
||||||
|
hash = "sha256-B0ZKk9TJy2+sYGs7TEX2KxUiOVawIb+RXNgToU1Fz5I=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ pcre2 ];
|
buildInputs = [ pcre2 ];
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
|
@ -17338,6 +17338,16 @@ with pkgs;
|
||||||
phpExtensions = php.extensions;
|
phpExtensions = php.extensions;
|
||||||
phpPackages = php.packages;
|
phpPackages = php.packages;
|
||||||
|
|
||||||
|
# Import PHP83 interpreter, extensions and packages
|
||||||
|
php83 = callPackage ../development/interpreters/php/8.3.nix {
|
||||||
|
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||||
|
pcre2 = pcre2.override {
|
||||||
|
withJitSealloc = false; # See https://bugs.php.net/bug.php?id=78927 and https://bugs.php.net/bug.php?id=78630
|
||||||
|
};
|
||||||
|
};
|
||||||
|
php83Extensions = recurseIntoAttrs php83.extensions;
|
||||||
|
php83Packages = recurseIntoAttrs php83.packages;
|
||||||
|
|
||||||
# Import PHP82 interpreter, extensions and packages
|
# Import PHP82 interpreter, extensions and packages
|
||||||
php82 = callPackage ../development/interpreters/php/8.2.nix {
|
php82 = callPackage ../development/interpreters/php/8.2.nix {
|
||||||
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, fetchgit
|
|
||||||
, phpPackage
|
, phpPackage
|
||||||
, autoconf
|
, autoconf
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -10,22 +9,16 @@
|
||||||
, curl
|
, curl
|
||||||
, cyrus_sasl
|
, cyrus_sasl
|
||||||
, enchant2
|
, enchant2
|
||||||
, fetchpatch
|
|
||||||
, freetds
|
, freetds
|
||||||
, freetype
|
|
||||||
, gd
|
, gd
|
||||||
, gettext
|
, gettext
|
||||||
, gmp
|
, gmp
|
||||||
, html-tidy
|
, html-tidy
|
||||||
, icu64
|
, icu64
|
||||||
, libXpm
|
|
||||||
, libffi
|
, libffi
|
||||||
, libiconv
|
, libiconv
|
||||||
, libjpeg
|
|
||||||
, libkrb5
|
, libkrb5
|
||||||
, libpng
|
|
||||||
, libsodium
|
, libsodium
|
||||||
, libwebp
|
|
||||||
, libxml2
|
, libxml2
|
||||||
, libxslt
|
, libxslt
|
||||||
, libzip
|
, libzip
|
||||||
|
@ -46,6 +39,7 @@
|
||||||
, uwimap
|
, uwimap
|
||||||
, valgrind
|
, valgrind
|
||||||
, zlib
|
, zlib
|
||||||
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
lib.makeScope pkgs.newScope (self: with self; {
|
lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
@ -84,15 +78,15 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
# will mark the extension as a zend extension or not.
|
# will mark the extension as a zend extension or not.
|
||||||
mkExtension = lib.makeOverridable
|
mkExtension = lib.makeOverridable
|
||||||
({ name
|
({ name
|
||||||
, configureFlags ? [ "--enable-${extName}" ]
|
, configureFlags ? [ "--enable-${extName}" ]
|
||||||
, internalDeps ? [ ]
|
, internalDeps ? [ ]
|
||||||
, postPhpize ? ""
|
, postPhpize ? ""
|
||||||
, buildInputs ? [ ]
|
, buildInputs ? [ ]
|
||||||
, zendExtension ? false
|
, zendExtension ? false
|
||||||
, doCheck ? true
|
, doCheck ? true
|
||||||
, extName ? name
|
, extName ? name
|
||||||
, ...
|
, ...
|
||||||
}@args: stdenv.mkDerivation ((builtins.removeAttrs args [ "name" ]) // {
|
}@args: stdenv.mkDerivation ((builtins.removeAttrs args [ "name" ]) // {
|
||||||
pname = "php-${name}";
|
pname = "php-${name}";
|
||||||
extensionName = extName;
|
extensionName = extName;
|
||||||
|
|
||||||
|
@ -216,8 +210,6 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
|
||||||
ast = callPackage ../development/php-packages/ast { };
|
ast = callPackage ../development/php-packages/ast { };
|
||||||
|
|
||||||
blackfire = pkgs.callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
|
|
||||||
|
|
||||||
couchbase = callPackage ../development/php-packages/couchbase { };
|
couchbase = callPackage ../development/php-packages/couchbase { };
|
||||||
|
|
||||||
datadog_trace = callPackage ../development/php-packages/datadog_trace { };
|
datadog_trace = callPackage ../development/php-packages/datadog_trace { };
|
||||||
|
@ -282,7 +274,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
|
||||||
redis = callPackage ../development/php-packages/redis { };
|
redis = callPackage ../development/php-packages/redis { };
|
||||||
|
|
||||||
relay = callPackage ../development/php-packages/relay { inherit php; };
|
relay = callPackage ../development/php-packages/relay { inherit php; };
|
||||||
|
|
||||||
smbclient = callPackage ../development/php-packages/smbclient { };
|
smbclient = callPackage ../development/php-packages/smbclient { };
|
||||||
|
|
||||||
|
@ -332,7 +324,16 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
}
|
}
|
||||||
{ name = "exif"; doCheck = false; }
|
{ name = "exif"; doCheck = false; }
|
||||||
{ name = "ffi"; buildInputs = [ libffi ]; }
|
{ name = "ffi"; buildInputs = [ libffi ]; }
|
||||||
{ name = "fileinfo"; buildInputs = [ pcre2 ]; }
|
{
|
||||||
|
name = "fileinfo";
|
||||||
|
buildInputs = [ pcre2 ];
|
||||||
|
patches = lib.optionals (lib.versionAtLeast php.version "8.3") [
|
||||||
|
# Fix the extension unable to be loaded due to missing `get_module` function.
|
||||||
|
# `ZEND_GET_MODULE` macro that creates it is conditional on `COMPILE_DL_FILEINFO` being defined.
|
||||||
|
# https://github.com/php/php-src/issues/11408#issuecomment-1602106200
|
||||||
|
../development/interpreters/php/fix-fileinfo-ext-php83.patch
|
||||||
|
];
|
||||||
|
}
|
||||||
{ name = "filter"; buildInputs = [ pcre2 ]; }
|
{ name = "filter"; buildInputs = [ pcre2 ]; }
|
||||||
{ name = "ftp"; buildInputs = [ openssl ]; }
|
{ name = "ftp"; buildInputs = [ openssl ]; }
|
||||||
{
|
{
|
||||||
|
@ -519,7 +520,18 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
'';
|
'';
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
}
|
}
|
||||||
{ name = "session"; doCheck = false; }
|
{ name = "session";
|
||||||
|
doCheck = false;
|
||||||
|
patches = lib.optionals (lib.versionAtLeast php.version "8.3") [
|
||||||
|
# Fix GH-11529: Crash after dealing with an Apache request
|
||||||
|
# To be removed in next alpha
|
||||||
|
# See https://github.com/php/php-src/issues/11529
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/php/php-src/commit/8d4370954ec610164a4503431bb0c52da6954aa7.patch";
|
||||||
|
hash = "sha256-w1uF9lRdfhz9I0gux0J4cvMzNS93uSHL1fYG23VLDPc=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
{ name = "shmop"; }
|
{ name = "shmop"; }
|
||||||
{
|
{
|
||||||
name = "simplexml";
|
name = "simplexml";
|
||||||
|
@ -625,5 +637,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
# Produce the final attribute set of all extensions defined.
|
# Produce the final attribute set of all extensions defined.
|
||||||
in
|
in
|
||||||
builtins.listToAttrs namedExtensions
|
builtins.listToAttrs namedExtensions
|
||||||
);
|
) // lib.optionalAttrs (!(lib.versionAtLeast php.version "8.3")) {
|
||||||
|
blackfire = callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue