Skip to content

Commit ea5a824

Browse files
authored
php84Extensions.imagick: fix darwin build (#360575)
2 parents b8dbeaf + 6e826b7 commit ea5a824

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkgs/development/php-packages/imagick/default.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
buildPecl,
3+
fetchpatch,
34
lib,
45
imagemagick,
56
pkg-config,
67
pcre2,
8+
php,
79
}:
810

911
buildPecl {
@@ -16,6 +18,16 @@ buildPecl {
1618
nativeBuildInputs = [ pkg-config ];
1719
buildInputs = [ pcre2 ];
1820

21+
patches = lib.optionals (lib.versionAtLeast php.version "8.4") [
22+
# PHP 8.4 compatibility patch based on https://github.com/Imagick/imagick/pull/690
23+
# These is also an alternative https://github.com/Imagick/imagick/pull/704
24+
# Which includes more changes but doesn't apply cleanly.
25+
(fetchpatch {
26+
url = "https://github.com/Imagick/imagick/commit/65e27f2bc02e7e8f1bf64e26e359e42a1331fca1.patch";
27+
hash = "sha256-I0FwdqtQ/Y/QVkCl+nWPBIxsdQY6qcjdwiA/BaLNl7g=";
28+
})
29+
];
30+
1931
meta = with lib; {
2032
description = "Imagick is a native php extension to create and modify images using the ImageMagick API";
2133
license = licenses.php301;

0 commit comments

Comments
 (0)