Merge pull request #114210 from jtojnar/fix-optionals
top-level/php-packages: fix types
This commit is contained in:
commit
3f4d4ee05a
|
@ -268,7 +268,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
configureFlags = [ "--enable-dom" ]
|
configureFlags = [ "--enable-dom" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
||||||
{ name = "enchant";
|
{ name = "enchant";
|
||||||
buildInputs = [ enchant1 ];
|
buildInputs = [ enchant1 ];
|
||||||
configureFlags = [ "--with-enchant=${enchant1}" ];
|
configureFlags = [ "--with-enchant=${enchant1}" ];
|
||||||
|
@ -331,10 +331,12 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
# interbase (7.3, 7.2)
|
# interbase (7.3, 7.2)
|
||||||
{ name = "intl";
|
{ name = "intl";
|
||||||
buildInputs = [ icu64 ];
|
buildInputs = [ icu64 ];
|
||||||
patches = lib.optional (lib.versionOlder php.version "7.4") (fetchpatch {
|
patches = lib.optionals (lib.versionOlder php.version "7.4") [
|
||||||
url = "https://github.com/php/php-src/commit/93a9b56c90c334896e977721bfb3f38b1721cec6.patch";
|
(fetchpatch {
|
||||||
sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4";
|
url = "https://github.com/php/php-src/commit/93a9b56c90c334896e977721bfb3f38b1721cec6.patch";
|
||||||
});
|
sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4";
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{ name = "json"; enable = lib.versionOlder php.version "8.0"; }
|
{ name = "json"; enable = lib.versionOlder php.version "8.0"; }
|
||||||
{ name = "ldap";
|
{ name = "ldap";
|
||||||
|
@ -344,7 +346,9 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
"LDAP_DIR=${openldap.dev}"
|
"LDAP_DIR=${openldap.dev}"
|
||||||
"LDAP_INCDIR=${openldap.dev}/include"
|
"LDAP_INCDIR=${openldap.dev}/include"
|
||||||
"LDAP_LIBDIR=${openldap.out}/lib"
|
"LDAP_LIBDIR=${openldap.out}/lib"
|
||||||
] ++ lib.optional stdenv.isLinux "--with-ldap-sasl=${cyrus_sasl.dev}";
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
"--with-ldap-sasl=${cyrus_sasl.dev}"
|
||||||
|
];
|
||||||
doCheck = false; }
|
doCheck = false; }
|
||||||
{ name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
{ name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
||||||
pcre'
|
pcre'
|
||||||
|
@ -374,7 +378,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
+----------------------------------------------------------------------+
|
+----------------------------------------------------------------------+
|
||||||
| Copyright (c) The PHP Group |
|
| Copyright (c) The PHP Group |
|
||||||
'')
|
'')
|
||||||
] ++ lib.optional (lib.versionOlder php.version "7.4.8") [
|
] ++ lib.optionals (lib.versionOlder php.version "7.4.8") [
|
||||||
(pkgs.writeText "mysqlnd_fix_compression.patch" ''
|
(pkgs.writeText "mysqlnd_fix_compression.patch" ''
|
||||||
--- a/ext/mysqlnd/mysqlnd.h
|
--- a/ext/mysqlnd/mysqlnd.h
|
||||||
+++ b/ext/mysqlnd/mysqlnd.h
|
+++ b/ext/mysqlnd/mysqlnd.h
|
||||||
|
@ -398,7 +402,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
buildInputs = [ pcre' ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
buildInputs = [ pcre' ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
|
||||||
valgrind.dev
|
valgrind.dev
|
||||||
];
|
];
|
||||||
patches = [] ++ lib.optional (lib.versionOlder php.version "7.4") [
|
patches = [] ++ lib.optionals (lib.versionOlder php.version "7.4") [
|
||||||
(pkgs.writeText "zend_file_cache_config.patch" ''
|
(pkgs.writeText "zend_file_cache_config.patch" ''
|
||||||
--- a/ext/opcache/zend_file_cache.c
|
--- a/ext/opcache/zend_file_cache.c
|
||||||
+++ b/ext/opcache/zend_file_cache.c
|
+++ b/ext/opcache/zend_file_cache.c
|
||||||
|
@ -468,7 +472,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
buildInputs = [ libxml2 pcre' ];
|
buildInputs = [ libxml2 pcre' ];
|
||||||
configureFlags = [ "--enable-simplexml" ]
|
configureFlags = [ "--enable-simplexml" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
||||||
{ name = "snmp";
|
{ name = "snmp";
|
||||||
buildInputs = [ net-snmp openssl ];
|
buildInputs = [ net-snmp openssl ];
|
||||||
configureFlags = [ "--with-snmp" ];
|
configureFlags = [ "--with-snmp" ];
|
||||||
|
@ -479,7 +483,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
configureFlags = [ "--enable-soap" ]
|
configureFlags = [ "--enable-soap" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ];
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ];
|
||||||
doCheck = false; }
|
doCheck = false; }
|
||||||
{ name = "sockets"; doCheck = false; }
|
{ name = "sockets"; doCheck = false; }
|
||||||
{ name = "sodium"; buildInputs = [ libsodium ]; }
|
{ name = "sodium"; buildInputs = [ libsodium ]; }
|
||||||
|
@ -499,7 +503,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
configureFlags = [ "--enable-xml" ]
|
configureFlags = [ "--enable-xml" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ];
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ];
|
||||||
doCheck = false; }
|
doCheck = false; }
|
||||||
{ name = "xmlreader";
|
{ name = "xmlreader";
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
|
@ -507,19 +511,19 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ];
|
NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ];
|
||||||
configureFlags = [ "--enable-xmlreader" ]
|
configureFlags = [ "--enable-xmlreader" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
||||||
{ name = "xmlrpc";
|
{ name = "xmlrpc";
|
||||||
buildInputs = [ libxml2 libiconv ];
|
buildInputs = [ libxml2 libiconv ];
|
||||||
# xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc
|
# xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc
|
||||||
enable = lib.versionOlder php.version "8.0";
|
enable = lib.versionOlder php.version "8.0";
|
||||||
configureFlags = [ "--with-xmlrpc" ]
|
configureFlags = [ "--with-xmlrpc" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
||||||
{ name = "xmlwriter";
|
{ name = "xmlwriter";
|
||||||
buildInputs = [ libxml2 ];
|
buildInputs = [ libxml2 ];
|
||||||
configureFlags = [ "--enable-xmlwriter" ]
|
configureFlags = [ "--enable-xmlwriter" ]
|
||||||
# Required to build on darwin.
|
# Required to build on darwin.
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
|
||||||
{ name = "xsl";
|
{ name = "xsl";
|
||||||
buildInputs = [ libxslt libxml2 ];
|
buildInputs = [ libxslt libxml2 ];
|
||||||
doCheck = lib.versionOlder php.version "8.0";
|
doCheck = lib.versionOlder php.version "8.0";
|
||||||
|
@ -528,8 +532,8 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
{ name = "zip";
|
{ name = "zip";
|
||||||
buildInputs = [ libzip pcre' ];
|
buildInputs = [ libzip pcre' ];
|
||||||
configureFlags = [ "--with-zip" ]
|
configureFlags = [ "--with-zip" ]
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
|
||||||
++ lib.optional (lib.versionOlder php.version "7.3") [ "--with-libzip" ];
|
++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ];
|
||||||
doCheck = false; }
|
doCheck = false; }
|
||||||
{ name = "zlib";
|
{ name = "zlib";
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ];
|
||||||
|
@ -538,7 +542,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
../development/interpreters/php/zlib-darwin-tests.patch
|
../development/interpreters/php/zlib-darwin-tests.patch
|
||||||
];
|
];
|
||||||
configureFlags = [ "--with-zlib" ]
|
configureFlags = [ "--with-zlib" ]
|
||||||
++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]; }
|
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Convert the list of attrs:
|
# Convert the list of attrs:
|
||||||
|
|
Loading…
Reference in New Issue