mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
php.extensions.imap: Fetch from PECL
PHP 8.4 will remove it from tree:
987417e2e0
Keeping in-tree versions for PHP < 8.3 since the PECL version does not build there.
This commit is contained in:
parent
b92fa30124
commit
a15c71f684
60
pkgs/development/php-packages/imap/default.nix
Normal file
60
pkgs/development/php-packages/imap/default.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
buildPecl,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
lib,
|
||||
libkrb5,
|
||||
openssl,
|
||||
pam,
|
||||
pcre2,
|
||||
pkg-config,
|
||||
uwimap,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.0.2";
|
||||
in
|
||||
buildPecl {
|
||||
inherit version;
|
||||
pname = "imap";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "php";
|
||||
repo = "pecl-mail-imap";
|
||||
rev = version;
|
||||
hash = "sha256-QVeimxm3rfWMvMpSgadhMKd24yPdDGVuhXIOs8668do=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix compilation with PHP 8.4.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/php/pecl-mail-imap/commit/4fc9970a29c205ec328f36edc8c119c158129324.patch";
|
||||
hash = "sha256-MxEaEe4YVeP7W5gDSNJb0thwAhxDj/yRr3qvjlJjRL4=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
uwimap
|
||||
openssl
|
||||
pam
|
||||
pcre2
|
||||
libkrb5
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-imap=${uwimap}"
|
||||
"--with-imap-ssl"
|
||||
"--with-kerberos"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "PHP extension for checking the spelling of a word";
|
||||
homepage = "https://pecl.php.net/package/imap";
|
||||
license = licenses.php301;
|
||||
maintainers = teams.php.members;
|
||||
};
|
||||
}
|
@ -265,6 +265,9 @@ in {
|
||||
|
||||
imagick = callPackage ../development/php-packages/imagick { };
|
||||
|
||||
# Shadowed by built-in version on PHP < 8.3.
|
||||
imap = callPackage ../development/php-packages/imap { };
|
||||
|
||||
inotify = callPackage ../development/php-packages/inotify { };
|
||||
|
||||
ioncube-loader = callPackage ../development/php-packages/ioncube-loader { };
|
||||
@ -453,6 +456,8 @@ in {
|
||||
name = "imap";
|
||||
buildInputs = [ uwimap openssl pam pcre2 libkrb5 ];
|
||||
configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" "--with-kerberos" ];
|
||||
# Using version from PECL on new PHP versions.
|
||||
enable = lib.versionOlder php.version "8.3";
|
||||
}
|
||||
{
|
||||
name = "intl";
|
||||
|
Loading…
Reference in New Issue
Block a user