diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 12f8954c4040..ffc3408d1652 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -763,6 +763,7 @@ in { php81 = handleTest ./php { php = pkgs.php81; }; php82 = handleTest ./php { php = pkgs.php82; }; php83 = handleTest ./php { php = pkgs.php83; }; + php84 = handleTest ./php { php = pkgs.php84; }; phylactery = handleTest ./web-apps/phylactery.nix {}; pict-rs = handleTest ./pict-rs.nix {}; pinnwand = handleTest ./pinnwand.nix {}; diff --git a/pkgs/development/interpreters/php/8.4.nix b/pkgs/development/interpreters/php/8.4.nix new file mode 100644 index 000000000000..9c6fd1d39288 --- /dev/null +++ b/pkgs/development/interpreters/php/8.4.nix @@ -0,0 +1,61 @@ +{ callPackage, fetchurl, ... }@_args: + +let + base = callPackage ./generic.nix ( + _args + // { + version = "8.4.0alpha4"; + phpSrc = fetchurl { + url = "https://downloads.php.net/~saki/php-8.4.0alpha4.tar.xz"; + hash = "sha256-v411aNKrbteDZnkfpai8SqUgWFQbqZJbzPF5mdCr2Og="; + }; + } + ); +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 + sysvsem + sqlite3 + tokenizer + xmlreader + xmlwriter + zip + zlib + ] +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 051d8b0676a6..2e5fd6420ee5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16854,6 +16854,16 @@ with pkgs; phpExtensions = php.extensions; phpPackages = php.packages; + # Import PHP84 interpreter, extensions and packages + php84 = callPackage ../development/interpreters/php/8.4.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 + }; + }; + php84Extensions = recurseIntoAttrs php84.extensions; + php84Packages = recurseIntoAttrs php84.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; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 1c4903915b37..d6d2af5850d0 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -409,6 +409,14 @@ in { hash = "sha256-sodGODHb4l04P0srn3L8l3K+DjZzCsCNbamfkmIyF+k="; excludes = [ "NEWS" ]; }) + ] ++ lib.optionals (lib.versions.majorMinor php.version == "8.4") [ + # Fix compatibility with libxml2 ≥ 2.13.2 + # https://github.com/php/php-src/issues/15331 + (fetchpatch { + url = "https://github.com/php/php-src/commit/8d7365b6f009ba43e305d6459013ac4fbed7c606.diff?full_index=1"; + hash = "sha256-ct0Ml9kjjcRLryjxMsUQQsDXiDExjpnCnWKf+mYgTsQ="; + excludes = [ "NEWS" ]; + }) ]; } {