Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildPecl, 3 fetchpatch, 4 lib, 5 imagemagick, 6 pkg-config, 7 pcre2, 8 php, 9}: 10 11buildPecl { 12 pname = "imagick"; 13 14 version = "3.7.0"; 15 sha256 = "sha256-WjZDVBCQKdIkvLsuguFbJIvptkEif0XmNCXAZTF5LT4="; 16 17 configureFlags = [ "--with-imagick=${imagemagick.dev}" ]; 18 nativeBuildInputs = [ pkg-config ]; 19 buildInputs = [ pcre2 ]; 20 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 31 meta = with lib; { 32 description = "Imagick is a native php extension to create and modify images using the ImageMagick API"; 33 license = licenses.php301; 34 homepage = "https://pecl.php.net/package/imagick"; 35 teams = [ teams.php ]; 36 }; 37}