summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-06-26 20:51:23 +0200
committerGitHub <noreply@github.com>2023-06-26 20:51:23 +0200
commit5f85fe1e8ae2a00004e854c7585bc0f8840c0009 (patch)
tree18d15c5620f153a073b662c3627c4a3923ed15dd /pkgs/development
parent7f8a16b9f54c272bea8af6ba66b4c80e8a6e4afe (diff)
downloadnixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar.gz
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar.bz2
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar.lz
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar.xz
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.tar.zst
nixpkgs-5f85fe1e8ae2a00004e854c7585bc0f8840c0009.zip
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
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/interpreters/php/8.3.nix57
-rw-r--r--pkgs/development/interpreters/php/fix-fileinfo-ext-php83.patch14
-rw-r--r--pkgs/development/php-packages/apcu/default.nix9
3 files changed, 79 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/php/8.3.nix b/pkgs/development/interpreters/php/8.3.nix
new file mode 100644
index 00000000000..b49c89050f8
--- /dev/null
+++ b/pkgs/development/interpreters/php/8.3.nix
@@ -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
+]))
diff --git a/pkgs/development/interpreters/php/fix-fileinfo-ext-php83.patch b/pkgs/development/interpreters/php/fix-fileinfo-ext-php83.patch
new file mode 100644
index 00000000000..fbd6a66dbd1
--- /dev/null
+++ b/pkgs/development/interpreters/php/fix-fileinfo-ext-php83.patch
@@ -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"
diff --git a/pkgs/development/php-packages/apcu/default.nix b/pkgs/development/php-packages/apcu/default.nix
index 556d28ba013..ffb3ef3771b 100644
--- a/pkgs/development/php-packages/apcu/default.nix
+++ b/pkgs/development/php-packages/apcu/default.nix
@@ -1,4 +1,4 @@
-{ buildPecl, lib, pcre2, fetchFromGitHub }:
+{ buildPecl, lib, pcre2, fetchFromGitHub, php, fetchpatch }:
 
 let
   version = "5.1.22";
@@ -13,6 +13,13 @@ in buildPecl {
     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 ];
   doCheck = true;
   checkTarget = "test";