From e01eb309098a3d68ad9c87a2c21cbc065c94973f Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:22:25 +0100 Subject: [PATCH 1/5] flake.lock: Update --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 53e2696..789aa80 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1732722421, + "narHash": "sha256-HRJ/18p+WoXpWJkcdsk9St5ZiukCqSDgbOGFa8Okehg=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725534445, - "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", + "lastModified": 1732937961, + "narHash": "sha256-B5pYT+IVaqcrfOekkwKvx/iToDnuQWzc2oyDxzzBDc4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39", + "rev": "4703b8d2c708e13a8cab03d865f90973536dcdf5", "type": "github" }, "original": { @@ -59,11 +59,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { From 4ce1611577fc25885ca47e99d23708332043881f Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:23:25 +0100 Subject: [PATCH 2/5] php84.extensions.xdebug: use stable 3.4.0 --- pkgs/package-overrides.nix | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/pkgs/package-overrides.nix b/pkgs/package-overrides.nix index 3c9a6f9..753f17b 100644 --- a/pkgs/package-overrides.nix +++ b/pkgs/package-overrides.nix @@ -835,24 +835,7 @@ in xdebug = # xdebug versions were determined using https://xdebug.org/docs/compat - if lib.versionAtLeast prev.php.version "8.4" then - prev.extensions.xdebug.overrideAttrs (attrs: { - name = "xdebug-3.4.0alpha1"; - version = "3.4.0alpha1"; - src = pkgs.fetchurl { - url = "https://xdebug.org/files/xdebug-3.4.0alpha1.tgz"; - hash = "sha256-S4oizwlhom50uV+ToV6ctdWka8d2CKnAPb2YmWOytOc="; - }; - - patches = [ - # Fix missing ZEND_EXIT - (pkgs.fetchpatch { - url = "https://github.com/xdebug/xdebug/commit/6ecd35f898e67cbe7f9257e7cb3a4c602a3dc8ec.patch"; - hash = "sha256-IYc1KKPBYek4AXEijoM9RaTwp51J0Gz/CQ1HgmTct3Q="; - }) - ]; - }) - else if lib.versionAtLeast prev.php.version "8.0" then + if lib.versionAtLeast prev.php.version "8.0" then prev.extensions.xdebug else if lib.versionAtLeast prev.php.version "7.2" then prev.extensions.xdebug.overrideAttrs (attrs: { From f157763e70a28438b8d4d6dd6cedd31c15024dd3 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:24:09 +0100 Subject: [PATCH 3/5] php7{1-3}.extension.soap: remove failing tests --- pkgs/package-overrides.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/package-overrides.nix b/pkgs/package-overrides.nix index 753f17b..28b81a8 100644 --- a/pkgs/package-overrides.nix +++ b/pkgs/package-overrides.nix @@ -757,8 +757,17 @@ in "--with-libxml-dir=${pkgs.libxml2.dev}" ]; - # Tests fail on Darwin with older PHP versions for some reason. - doCheck = attrs.doCheck or true && (lib.versionOlder prev.php.version "7.4" -> pkgs.stdenv.isLinux); + # Tests fail on Darwin with older PHP versions for some reason. + doCheck = attrs.doCheck or true && (lib.versionOlder prev.php.version "7.4" -> pkgs.stdenv.isLinux); + + postPatch = + attrs.postPatch or "" + + lib.optionalString (lib.versionAtLeast prev.php.version "7.1" && lib.versionOlder prev.php.version "7.4") '' + rm ext/soap/tests/bugs/bug66112.phpt + '' + + lib.optionalString (lib.versionAtLeast prev.php.version "7.1" && lib.versionOlder prev.php.version "7.2") '' + rm ext/soap/tests/bugs/bug76348.phpt + ''; }); From 138342473302908f4320345b44cb386d7d98042d Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:14:13 +0100 Subject: [PATCH 4/5] php81.extension.dom: apply libxml2 patch only for version below 8.1.31 --- pkgs/package-overrides.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/package-overrides.nix b/pkgs/package-overrides.nix index 28b81a8..6269168 100644 --- a/pkgs/package-overrides.nix +++ b/pkgs/package-overrides.nix @@ -132,7 +132,11 @@ in # Patch rebased from https://github.com/php/php-src/commit/061058a9b1bbd90d27d97d79aebcf2b5029767b0 # Fix PHP tests with libxml2 2.12 ./patches/php74-libxml212-tests.patch - ] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.1" && lib.versionOlder prev.php.version "8.2.14") [ + ] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.2" && lib.versionOlder prev.php.version "8.2.14") [ + # Patch rebased from https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082 + # Fix compilation errors with libxml2 2.12 + ./patches/libxml-ext.patch + ] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.1" && lib.versionOlder prev.php.version "8.1.31") [ # Patch rebased from https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082 # Fix compilation errors with libxml2 2.12 ./patches/libxml-ext.patch From 8410ed9eaf5b14d00f4fa6f8c6ee562202fb39b5 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:59:41 +0100 Subject: [PATCH 5/5] php84.extension.imagick: attempt to fix build --- pkgs/package-overrides.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/package-overrides.nix b/pkgs/package-overrides.nix index 6269168..7766012 100644 --- a/pkgs/package-overrides.nix +++ b/pkgs/package-overrides.nix @@ -349,6 +349,17 @@ in ourPatches ++ upstreamPatches; }); + imagick = if lib.versionAtLeast prev.php.version "8.4" then + prev.extensions.imagick.overrideAttrs (attrs: { + patches = (attrs.patches or []) ++ [ + (pkgs.fetchpatch { + url = "https://github.com/Imagick/imagick/commit/65e27f2bc02e7e8f1bf64e26e359e42a1331fca1.patch"; + hash ="sha256-I0FwdqtQ/Y/QVkCl+nWPBIxsdQY6qcjdwiA/BaLNl7g="; + }) + ]; + }) + else prev.extensions.imagick; + imap = if lib.versionOlder prev.php.version "8.1" && pkgs.stdenv.cc.isClang then prev.extensions.imap.overrideAttrs (attrs: {