Merge pull request #125500 from etu/php-spring-release-cleaning

php: post-release spring cleaning and upgrade to 8.0 as default

Changed files
+97 -309
nixos
doc
manual
from_md
release-notes
release-notes
tests
pkgs
applications
misc
rss-bridge-cli
development
interpreters
php-packages
apcu
apcu_bc
composer
couchbase
imagick
mongodb
pcov
php_excel
pinba
protobuf
pthreads
rdkafka
snuffleupagus
swoole
tools
misc
drush
servers
http
top-level
+13 -2
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
···
</itemizedlist>
<section xml:id="highlights">
<title>Highlights</title>
-
<para>
-
</para>
</section>
<section xml:id="new-services">
<title>New Services</title>
···
<literal>services.geoip-updater</literal> was broken and has
been replaced by
<link xlink:href="options.html#opt-services.geoipupdate.enable">services.geoipupdate</link>.
</para>
</listitem>
</itemizedlist>
···
</itemizedlist>
<section xml:id="highlights">
<title>Highlights</title>
+
<itemizedlist spacing="compact">
+
<listitem>
+
<para>
+
PHP now defaults to PHP 8.0, updated from 7.4.
+
</para>
+
</listitem>
+
</itemizedlist>
</section>
<section xml:id="new-services">
<title>New Services</title>
···
<literal>services.geoip-updater</literal> was broken and has
been replaced by
<link xlink:href="options.html#opt-services.geoipupdate.enable">services.geoipupdate</link>.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
+
PHP 7.3 is no longer supported due to upstream not supporting
+
this version for the entire lifecycle of the 21.11 release.
</para>
</listitem>
</itemizedlist>
+5
nixos/doc/manual/release-notes/rl-2111.section.md
···
## Highlights
## New Services
* [geoipupdate](https://github.com/maxmind/geoipupdate), a GeoIP
···
* `services.geoip-updater` was broken and has been replaced by
[services.geoipupdate](options.html#opt-services.geoipupdate.enable).
## Other Notable Changes
···
## Highlights
+
* PHP now defaults to PHP 8.0, updated from 7.4.
+
## New Services
* [geoipupdate](https://github.com/maxmind/geoipupdate), a GeoIP
···
* `services.geoip-updater` was broken and has been replaced by
[services.geoipupdate](options.html#opt-services.geoipupdate.enable).
+
+
* PHP 7.3 is no longer supported due to upstream not supporting this
+
version for the entire lifecycle of the 21.11 release.
## Other Notable Changes
-1
nixos/tests/all-tests.nix
···
pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {};
php = handleTest ./php {};
-
php73 = handleTest ./php { php = pkgs.php73; };
php74 = handleTest ./php { php = pkgs.php74; };
php80 = handleTest ./php { php = pkgs.php80; };
pinnwand = handleTest ./pinnwand.nix {};
···
pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {};
php = handleTest ./php {};
php74 = handleTest ./php { php = pkgs.php74; };
php80 = handleTest ./php { php = pkgs.php80; };
pinnwand = handleTest ./pinnwand.nix {};
+18 -28
nixos/tests/web-servers/unit-php.nix
···
import ../make-test-python.nix ({pkgs, ...}:
-
let
-
testdir = pkgs.writeTextDir "www/info.php" "<?php phpinfo();";
in {
name = "unit-php-test";
···
machine = { config, lib, pkgs, ... }: {
services.unit = {
enable = true;
-
config = ''
-
{
-
"listeners": {
-
"*:9074": {
-
"application": "php_74"
-
}
-
},
-
"applications": {
-
"php_74": {
-
"type": "php 7.4",
-
"processes": 1,
-
"user": "testuser",
-
"group": "testgroup",
-
"root": "${testdir}/www",
-
"index": "info.php",
-
"options": {
-
"file": "${pkgs.unit.usedPhp74}/lib/php.ini"
-
}
-
}
-
}
-
}
-
'';
};
users = {
users.testuser = {
isSystemUser = true;
-
uid = 1074;
group = "testgroup";
};
groups.testgroup = {
-
gid= 1074;
};
};
};
···
machine.wait_for_unit("unit.service")
# Check so we get an evaluated PHP back
-
response = machine.succeed("curl -f -vvv -s http://127.0.0.1:9074/")
-
assert "PHP Version ${pkgs.unit.usedPhp74.version}" in response, "PHP version not detected"
# Check so we have database and some other extensions loaded
for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]:
···
import ../make-test-python.nix ({pkgs, ...}:
+
let
+
testdir = pkgs.writeTextDir "www/info.php" "<?php phpinfo();";
in {
name = "unit-php-test";
···
machine = { config, lib, pkgs, ... }: {
services.unit = {
enable = true;
+
config = pkgs.lib.strings.toJSON {
+
listeners."*:9080".application = "php_80";
+
applications.php_80 = {
+
type = "php 8.0";
+
processes = 1;
+
user = "testuser";
+
group = "testgroup";
+
root = "${testdir}/www";
+
index = "info.php";
+
options.file = "${pkgs.unit.usedPhp80}/lib/php.ini";
+
};
+
};
};
users = {
users.testuser = {
isSystemUser = true;
+
uid = 1080;
group = "testgroup";
};
groups.testgroup = {
+
gid = 1080;
};
};
};
···
machine.wait_for_unit("unit.service")
# Check so we get an evaluated PHP back
+
response = machine.succeed("curl -f -vvv -s http://127.0.0.1:9080/")
+
assert "PHP Version ${pkgs.unit.usedPhp80.version}" in response, "PHP version not detected"
# Check so we have database and some other extensions loaded
for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]:
-1
pkgs/applications/misc/rss-bridge-cli/default.nix
···
curl
filter
iconv
-
json
mbstring
openssl
simplexml
···
curl
filter
iconv
mbstring
openssl
simplexml
-20
pkgs/development/interpreters/php/7.3.nix
···
-
{ callPackage, lib, stdenv, nixosTests, ... }@_args:
-
-
let
-
generic = (import ./generic.nix) _args;
-
-
base = callPackage generic (_args // {
-
version = "7.3.28";
-
sha256 = "0r4r8famg3a8x6ch24y1370nsphkxg4k9zq5x8v88f4l8mj6wqwg";
-
-
# https://bugs.php.net/bug.php?id=76826
-
extraPatches = lib.optional stdenv.isDarwin ./php73-darwin-isfinite.patch;
-
});
-
-
in base.withExtensions ({ all, ... }: with all; ([
-
bcmath calendar curl ctype dom exif fileinfo filter ftp gd
-
gettext gmp hash iconv intl json ldap mbstring mysqli mysqlnd
-
opcache openssl pcntl pdo pdo_mysql pdo_odbc pdo_pgsql pdo_sqlite
-
pgsql posix readline session simplexml sockets soap sodium sqlite3
-
tokenizer xmlreader xmlwriter zip zlib
-
] ++ lib.optionals (!stdenv.isDarwin) [ imap ]))
···
+7 -9
pkgs/development/interpreters/php/generic.nix
···
generic =
{ callPackage, lib, stdenv, nixosTests, fetchurl, makeWrapper
, symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
-
, pkg-config, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2
, systemd, system-sendmail, valgrind, xcbuild
, version
···
${extraConfig}
'';
-
phpWithExtensions = symlinkJoin rec {
name = "php-with-extensions-${version}";
inherit (php) version;
nativeBuildInputs = [ makeWrapper ];
···
mkWithExtensions = prevArgs: prevExtensionFunctions: extensions:
mkBuildEnv prevArgs prevExtensionFunctions { inherit extensions; };
-
-
pcre' = if (lib.versionAtLeast version "7.3") then pcre2 else pcre;
in
stdenv.mkDerivation {
pname = "php";
···
buildInputs =
# PCRE extension
-
[ pcre' ]
# Enable sapis
++ lib.optional pearSupport [ libxml2.dev ]
···
[ "--disable-all" ]
# PCRE
-
++ lib.optionals (lib.versionAtLeast version "7.4") [ "--with-external-pcre=${pcre'.dev}" ]
-
++ lib.optionals (lib.versions.majorMinor version == "7.3") [ "--with-pcre-regex=${pcre'.dev}" ]
-
++ lib.optionals (lib.versionOlder version "7.3") [ "--with-pcre-regex=${pcre'.dev}" ]
-
++ [ "PCRE_LIBDIR=${pcre'}" ]
# Enable sapis
···
generic =
{ callPackage, lib, stdenv, nixosTests, fetchurl, makeWrapper
, symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
+
, pkg-config, re2c, apacheHttpd, libargon2, libxml2, pcre2
, systemd, system-sendmail, valgrind, xcbuild
, version
···
${extraConfig}
'';
+
phpWithExtensions = symlinkJoin {
name = "php-with-extensions-${version}";
inherit (php) version;
nativeBuildInputs = [ makeWrapper ];
···
mkWithExtensions = prevArgs: prevExtensionFunctions: extensions:
mkBuildEnv prevArgs prevExtensionFunctions { inherit extensions; };
in
stdenv.mkDerivation {
pname = "php";
···
buildInputs =
# PCRE extension
+
[ pcre2 ]
# Enable sapis
++ lib.optional pearSupport [ libxml2.dev ]
···
[ "--disable-all" ]
# PCRE
+
++ lib.optionals (lib.versionAtLeast version "7.4") [ "--with-external-pcre=${pcre2.dev}" ]
+
++ lib.optionals (lib.versions.majorMinor version == "7.3") [ "--with-pcre-regex=${pcre2.dev}" ]
+
++ lib.optionals (lib.versionOlder version "7.3") [ "--with-pcre-regex=${pcre2.dev}" ]
+
++ [ "PCRE_LIBDIR=${pcre2}" ]
# Enable sapis
-60
pkgs/development/interpreters/php/php73-darwin-isfinite.patch
···
-
diff -ru a/configure.ac b/configure.ac
-
--- a/configure.ac 2018-12-04 19:12:20.000000000 +0300
-
+++ b/configure.ac 2018-12-10 12:30:37.798917520 +0300
-
@@ -68,7 +68,7 @@
-
#include <math.h>
-
-
#ifndef zend_isnan
-
-#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_isnan(a) isnan(a)
-
#elif defined(HAVE_FPCLASS)
-
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-
@@ -77,7 +77,7 @@
-
#endif
-
#endif
-
-
-#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_isinf(a) isinf(a)
-
#elif defined(INFINITY)
-
/* Might not work, but is required by ISO C99 */
-
@@ -88,7 +88,7 @@
-
#define zend_isinf(a) 0
-
#endif
-
-
-#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_finite(a) isfinite(a)
-
#elif defined(HAVE_FINITE)
-
#define zend_finite(a) finite(a)
-
diff -ru a/Zend/configure.ac b/Zend/configure.ac
-
--- a/Zend/configure.ac 2018-12-04 19:12:30.000000000 +0300
-
+++ b/Zend/configure.ac 2018-12-10 12:28:50.350929699 +0300
-
@@ -59,7 +59,7 @@
-
#include <math.h>
-
-
#ifndef zend_isnan
-
-#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_isnan(a) isnan(a)
-
#elif defined(HAVE_FPCLASS)
-
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-
@@ -68,7 +68,7 @@
-
#endif
-
#endif
-
-
-#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_isinf(a) isinf(a)
-
#elif defined(INFINITY)
-
/* Might not work, but is required by ISO C99 */
-
@@ -79,7 +79,7 @@
-
#define zend_isinf(a) 0
-
#endif
-
-
-#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
-
+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
-
#define zend_finite(a) isfinite(a)
-
#elif defined(HAVE_FINITE)
-
#define zend_finite(a) finite(a)
···
+2 -2
pkgs/development/php-packages/apcu/default.nix
···
-
{ buildPecl, lib, pcre' }:
buildPecl {
pname = "apcu";
···
version = "5.1.20";
sha256 = "sha256-uZ1A+v7Ab00TL87lPnUm3b/B0EHqbgThc4nfrSj5w5A=";
-
buildInputs = [ pcre' ];
doCheck = true;
checkTarget = "test";
checkFlagsArray = [ "REPORT_EXIT_STATUS=1" "NO_INTERACTION=1" ];
···
+
{ buildPecl, lib, pcre2 }:
buildPecl {
pname = "apcu";
···
version = "5.1.20";
sha256 = "sha256-uZ1A+v7Ab00TL87lPnUm3b/B0EHqbgThc4nfrSj5w5A=";
+
buildInputs = [ pcre2 ];
doCheck = true;
checkTarget = "test";
checkFlagsArray = [ "REPORT_EXIT_STATUS=1" "NO_INTERACTION=1" ];
+2 -2
pkgs/development/php-packages/apcu_bc/default.nix
···
-
{ buildPecl, lib, pcre', php }:
buildPecl {
pname = "apcu_bc";
···
peclDeps = [ php.extensions.apcu ];
-
buildInputs = [ pcre' ];
postInstall = ''
mv $out/lib/php/extensions/apc.so $out/lib/php/extensions/apcu_bc.so
···
+
{ buildPecl, lib, pcre2, php }:
buildPecl {
pname = "apcu_bc";
···
peclDeps = [ php.extensions.apcu ];
+
buildInputs = [ pcre2 ];
postInstall = ''
mv $out/lib/php/extensions/apc.so $out/lib/php/extensions/apcu_bc.so
-34
pkgs/development/php-packages/composer/1.x.nix
···
-
{ mkDerivation, fetchurl, makeWrapper, unzip, lib, php }:
-
let
-
pname = "composer";
-
version = "1.10.22";
-
in
-
mkDerivation {
-
inherit pname version;
-
-
src = fetchurl {
-
url = "https://getcomposer.org/download/${version}/composer.phar";
-
sha256 = "00073smi1jja00d4bqfs6p4fqs38mki2ziy7b1kwsmiv5lcsw9v1";
-
};
-
-
dontUnpack = true;
-
-
nativeBuildInputs = [ makeWrapper ];
-
-
installPhase = ''
-
runHook preInstall
-
mkdir -p $out/bin
-
install -D $src $out/libexec/composer/composer.phar
-
makeWrapper ${php}/bin/php $out/bin/composer \
-
--add-flags "$out/libexec/composer/composer.phar" \
-
--prefix PATH : ${lib.makeBinPath [ unzip ]}
-
runHook postInstall
-
'';
-
-
meta = with lib; {
-
description = "Dependency Manager for PHP";
-
license = licenses.mit;
-
homepage = "https://getcomposer.org/";
-
maintainers = with maintainers; [ offline ] ++ teams.php.members;
-
};
-
}
···
+1 -1
pkgs/development/php-packages/couchbase/default.nix
···
};
configureFlags = [ "--with-couchbase" ];
-
broken = lib.versionAtLeast php.version "8.0";
buildInputs = [ libcouchbase zlib ];
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
···
'')
];
meta.maintainers = lib.teams.php.members;
}
···
};
configureFlags = [ "--with-couchbase" ];
buildInputs = [ libcouchbase zlib ];
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
···
'')
];
+
meta.broken = lib.versionAtLeast php.version "8.0";
meta.maintainers = lib.teams.php.members;
}
+2 -2
pkgs/development/php-packages/imagick/default.nix
···
-
{ buildPecl, fetchpatch, lib, imagemagick, pkg-config, pcre' }:
buildPecl {
pname = "imagick";
···
configureFlags = [ "--with-imagick=${imagemagick.dev}" ];
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ pcre' ];
meta.maintainers = lib.teams.php.members;
}
···
+
{ buildPecl, fetchpatch, lib, imagemagick, pkg-config, pcre2 }:
buildPecl {
pname = "imagick";
···
configureFlags = [ "--with-imagick=${imagemagick.dev}" ];
nativeBuildInputs = [ pkg-config ];
+
buildInputs = [ pcre2 ];
meta.maintainers = lib.teams.php.members;
}
+2 -2
pkgs/development/php-packages/mongodb/default.nix
···
-
{ stdenv, buildPecl, lib, pcre', pkg-config, cyrus_sasl, icu64
, openssl, snappy, zlib, darwin }:
buildPecl {
···
openssl
snappy
zlib
-
pcre'
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
meta.maintainers = lib.teams.php.members;
···
+
{ stdenv, buildPecl, lib, pcre2, pkg-config, cyrus_sasl, icu64
, openssl, snappy, zlib, darwin }:
buildPecl {
···
openssl
snappy
zlib
+
pcre2
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
meta.maintainers = lib.teams.php.members;
+2 -2
pkgs/development/php-packages/pcov/default.nix
···
-
{ buildPecl, lib, pcre' }:
buildPecl {
pname = "pcov";
···
version = "1.0.8";
sha256 = "sha256-6rbniyxLIHPW/e+eWZN1qS8F1rOB7ld1N8JKUS1geRQ=";
-
buildInputs = [ pcre' ];
meta.maintainers = lib.teams.php.members;
}
···
+
{ buildPecl, lib, pcre2 }:
buildPecl {
pname = "pcov";
···
version = "1.0.8";
sha256 = "sha256-6rbniyxLIHPW/e+eWZN1qS8F1rOB7ld1N8JKUS1geRQ=";
+
buildInputs = [ pcre2 ];
meta.maintainers = lib.teams.php.members;
}
+2 -1
pkgs/development/php-packages/php_excel/default.nix
···
-
{ buildPecl, fetchurl, lib, libxl }:
let
pname = "php_excel";
phpVersion = "php7";
···
"--with-libxl-libdir=${libxl}/lib"
];
meta.maintainers = lib.teams.php.members;
}
···
+
{ buildPecl, fetchurl, lib, libxl, php }:
let
pname = "php_excel";
phpVersion = "php7";
···
"--with-libxl-libdir=${libxl}/lib"
];
+
meta.broken = lib.versionAtLeast php.version "8.0";
meta.maintainers = lib.teams.php.members;
}
+5 -14
pkgs/development/php-packages/pinba/default.nix
···
{ buildPecl, lib, fetchFromGitHub, php }:
-
let
-
pname = "pinba";
-
isPhp73 = lib.versionAtLeast php.version "7.3";
-
-
version = if isPhp73 then "1.1.2-dev" else "1.1.1";
-
src = fetchFromGitHub ({
owner = "tony2001";
repo = "pinba_extension";
-
} // (if (isPhp73) then {
rev = "edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e";
sha256 = "02sljqm6griw8ccqavl23f7w1hp2zflcv24lpf00k6pyrn9cwx80";
-
} else {
-
rev = "RELEASE_1_1_1";
-
sha256 = "1kdp7vav0y315695vhm3xifgsh6h6y6pny70xw3iai461n58khj5";
-
}));
-
in
-
buildPecl {
-
inherit pname version src;
meta = with lib; {
description = "PHP extension for Pinba";
···
{ buildPecl, lib, fetchFromGitHub, php }:
+
buildPecl {
+
pname = "pinba";
+
version = "1.1.2-dev";
+
src = fetchFromGitHub {
owner = "tony2001";
repo = "pinba_extension";
rev = "edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e";
sha256 = "02sljqm6griw8ccqavl23f7w1hp2zflcv24lpf00k6pyrn9cwx80";
+
};
meta = with lib; {
description = "PHP extension for Pinba";
+2 -2
pkgs/development/php-packages/protobuf/default.nix
···
-
{ buildPecl, lib, pcre', fetchpatch }:
buildPecl {
pname = "protobuf";
···
version = "3.14.0";
sha256 = "1ldc4s28hq61cfg8l4c06pgicj0ng7k37f28a0dnnbs7xkr7cibd";
-
buildInputs = [ pcre' ];
patches = [
# TODO: remove with next update
···
+
{ buildPecl, lib, pcre2, fetchpatch }:
buildPecl {
pname = "protobuf";
···
version = "3.14.0";
sha256 = "1ldc4s28hq61cfg8l4c06pgicj0ng7k37f28a0dnnbs7xkr7cibd";
+
buildInputs = [ pcre2 ];
patches = [
# TODO: remove with next update
-28
pkgs/development/php-packages/pthreads/default.nix
···
-
{ buildPecl, lib, fetchFromGitHub, php, pcre' }:
-
let
-
pname = "pthreads";
-
-
isPhp73 = lib.versionAtLeast php.version "7.3";
-
isPhp74 = lib.versionAtLeast php.version "7.4";
-
-
version = if isPhp73 then "3.2.0-dev" else "3.2.0";
-
-
src = fetchFromGitHub ({
-
owner = "krakjoe";
-
repo = "pthreads";
-
} // (if (isPhp73) then {
-
rev = "4d1c2483ceb459ea4284db4eb06646d5715e7154";
-
sha256 = "07kdxypy0bgggrfav2h1ccbv67lllbvpa3s3zsaqci0gq4fyi830";
-
} else {
-
rev = "v3.2.0";
-
sha256 = "17hypm75d4w7lvz96jb7s0s87018yzmmap0l125d5fd7abnhzfvv";
-
}));
-
in
-
buildPecl {
-
inherit pname version src;
-
-
buildInputs = [ pcre'.dev ];
-
-
meta.broken = isPhp74;
-
meta.maintainers = lib.teams.php.members;
-
}
···
+2 -2
pkgs/development/php-packages/rdkafka/default.nix
···
-
{ buildPecl, lib, rdkafka, pcre' }:
buildPecl {
pname = "rdkafka";
···
version = "5.0.0";
sha256 = "sha256-Qy+6rkPczhdxFbDhcuzmUTLMPUXYZ0HaheDBhkh4FXs=";
-
buildInputs = [ rdkafka pcre' ];
postPhpize = ''
substituteInPlace configure \
···
+
{ buildPecl, lib, rdkafka, pcre2 }:
buildPecl {
pname = "rdkafka";
···
version = "5.0.0";
sha256 = "sha256-Qy+6rkPczhdxFbDhcuzmUTLMPUXYZ0HaheDBhkh4FXs=";
+
buildInputs = [ rdkafka pcre2 ];
postPhpize = ''
substituteInPlace configure \
+2 -2
pkgs/development/php-packages/snuffleupagus/default.nix
···
, lib
, php
, fetchFromGitHub
-
, pcre'
, fetchpatch
}:
···
};
buildInputs = [
-
pcre'
];
internalDeps = with php.extensions; [
···
, lib
, php
, fetchFromGitHub
+
, pcre2
, fetchpatch
}:
···
};
buildInputs = [
+
pcre2
];
internalDeps = with php.extensions; [
+2 -2
pkgs/development/php-packages/swoole/default.nix
···
-
{ lib, buildPecl, php, valgrind, pcre' }:
buildPecl {
pname = "swoole";
···
version = "4.6.4";
sha256 = "0hgndnn27q7fbsb0nw6bfdg0kyy5di9vrmf7g53jc6lsnf73ha31";
-
buildInputs = [ valgrind pcre' ];
internalDeps = lib.optionals (lib.versionOlder php.version "7.4") [ php.extensions.hash ];
doCheck = true;
···
+
{ lib, buildPecl, php, valgrind, pcre2 }:
buildPecl {
pname = "swoole";
···
version = "4.6.4";
sha256 = "0hgndnn27q7fbsb0nw6bfdg0kyy5di9vrmf7g53jc6lsnf73ha31";
+
buildInputs = [ valgrind pcre2 ];
internalDeps = lib.optionals (lib.versionOlder php.version "7.4") [ php.extensions.hash ];
doCheck = true;
+2 -2
pkgs/development/tools/misc/drush/default.nix
···
-
{ lib, stdenv, fetchurl, php73, which, makeWrapper, bash, coreutils, ncurses }:
stdenv.mkDerivation rec {
name = "drush-6.1.0";
···
mkdir -p "$out"
cp -r . "$out/src"
mkdir "$out/bin"
-
wrapProgram "$out/src/drush" --prefix PATH : "${lib.makeBinPath [ which php73 bash coreutils ncurses ]}"
ln -s "$out/src/drush" "$out/bin/drush"
'';
}
···
+
{ lib, stdenv, fetchurl, php, which, makeWrapper, bash, coreutils, ncurses }:
stdenv.mkDerivation rec {
name = "drush-6.1.0";
···
mkdir -p "$out"
cp -r . "$out/src"
mkdir "$out/bin"
+
wrapProgram "$out/src/drush" --prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}"
ln -s "$out/src/drush" "$out/bin/drush"
'';
}
+6 -6
pkgs/servers/http/unit/default.nix
···
, pcre2
, withPython2 ? false, python2
, withPython3 ? true, python3, ncurses
-
, withPHP73 ? false, php73
-
, withPHP74 ? true, php74
, withPerl530 ? false, perl530
, withPerl532 ? true, perl532
, withPerldevel ? false, perldevel
···
fpmSupport = false;
};
-
php73-unit = php73.override phpConfig;
php74-unit = php74.override phpConfig;
in stdenv.mkDerivation rec {
version = "1.24.0";
···
buildInputs = [ pcre2.dev ]
++ optional withPython2 python2
++ optionals withPython3 [ python3 ncurses ]
-
++ optional withPHP73 php73-unit
++ optional withPHP74 php74-unit
++ optional withPerl530 perl530
++ optional withPerl532 perl532
++ optional withPerldevel perldevel
···
++ optional withDebug "--debug";
# Optionally add the PHP derivations used so they can be addressed in the configs
-
usedPhp73 = optionals withPHP73 php73-unit;
usedPhp74 = optionals withPHP74 php74-unit;
postConfigure = ''
${optionalString withPython2 "./configure python --module=python2 --config=python2-config --lib-path=${python2}/lib"}
${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"}
-
${optionalString withPHP73 "./configure php --module=php73 --config=${php73-unit.unwrapped.dev}/bin/php-config --lib-path=${php73-unit}/lib"}
${optionalString withPHP74 "./configure php --module=php74 --config=${php74-unit.unwrapped.dev}/bin/php-config --lib-path=${php74-unit}/lib"}
${optionalString withPerl530 "./configure perl --module=perl530 --perl=${perl530}/bin/perl"}
${optionalString withPerl532 "./configure perl --module=perl532 --perl=${perl532}/bin/perl"}
${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"}
···
, pcre2
, withPython2 ? false, python2
, withPython3 ? true, python3, ncurses
+
, withPHP74 ? false, php74
+
, withPHP80 ? true, php80
, withPerl530 ? false, perl530
, withPerl532 ? true, perl532
, withPerldevel ? false, perldevel
···
fpmSupport = false;
};
php74-unit = php74.override phpConfig;
+
php80-unit = php80.override phpConfig;
in stdenv.mkDerivation rec {
version = "1.24.0";
···
buildInputs = [ pcre2.dev ]
++ optional withPython2 python2
++ optionals withPython3 [ python3 ncurses ]
++ optional withPHP74 php74-unit
+
++ optional withPHP80 php80-unit
++ optional withPerl530 perl530
++ optional withPerl532 perl532
++ optional withPerldevel perldevel
···
++ optional withDebug "--debug";
# Optionally add the PHP derivations used so they can be addressed in the configs
usedPhp74 = optionals withPHP74 php74-unit;
+
usedPhp80 = optionals withPHP80 php80-unit;
postConfigure = ''
${optionalString withPython2 "./configure python --module=python2 --config=python2-config --lib-path=${python2}/lib"}
${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"}
${optionalString withPHP74 "./configure php --module=php74 --config=${php74-unit.unwrapped.dev}/bin/php-config --lib-path=${php74-unit}/lib"}
+
${optionalString withPHP80 "./configure php --module=php80 --config=${php80-unit.unwrapped.dev}/bin/php-config --lib-path=${php80-unit}/lib"}
${optionalString withPerl530 "./configure perl --module=perl530 --perl=${perl530}/bin/perl"}
${optionalString withPerl532 "./configure perl --module=perl532 --perl=${perl532}/bin/perl"}
${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"}
+7 -2
pkgs/top-level/aliases.nix
···
pgp-tools = signing-party; # added 2017-03-26
pg_tmp = ephemeralpg; # added 2018-01-16
php-embed = throw ''
php*-embed has been dropped, you can build something similar
with the following snippet:
···
similar with the following snippet:
(php74.override { embedSupport = true; apxs2Support = false; }).packages
''; # added 2020-04-01
-
php74Packages-embed = phpPackages-embed;
php73Packages-embed = phpPackages-embed;
php-unit = throw ''
php*-unit has been dropped, you can build something similar with
···
fpmSupport = false;
}).packages
''; # added 2020-04-01
-
php74Packages-unit = phpPackages-unit;
php73Packages-unit = phpPackages-unit;
pidgin-with-plugins = pidgin; # added 2016-06
pidginlatex = pidgin-latex; # added 2018-01-08
···
pgp-tools = signing-party; # added 2017-03-26
pg_tmp = ephemeralpg; # added 2018-01-16
+
# Obsolete PHP version aliases
+
php73 = throw "php73 has been dropped due to the lack of maintanence from upstream for future releases."; # added 2021-06-03
+
php73Packages = php73; # added 2021-06-03
+
php73Extensions = php73; # added 2021-06-03
+
php-embed = throw ''
php*-embed has been dropped, you can build something similar
with the following snippet:
···
similar with the following snippet:
(php74.override { embedSupport = true; apxs2Support = false; }).packages
''; # added 2020-04-01
php73Packages-embed = phpPackages-embed;
+
php74Packages-embed = phpPackages-embed;
php-unit = throw ''
php*-unit has been dropped, you can build something similar with
···
fpmSupport = false;
}).packages
''; # added 2020-04-01
php73Packages-unit = phpPackages-unit;
+
php74Packages-unit = phpPackages-unit;
pidgin-with-plugins = pidgin; # added 2016-06
pidginlatex = pidgin-latex; # added 2018-01-08
+4 -11
pkgs/top-level/all-packages.nix
···
}) arangodb_3_3 arangodb_3_4 arangodb_3_5;
arangodb = arangodb_3_4;
-
arcanist = callPackage ../development/tools/misc/arcanist {};
arduino = arduino-core.override { withGui = true; };
···
# PHP interpreters, packages and extensions.
#
# Set default PHP interpreter, extensions and packages
-
php = php74;
phpExtensions = php.extensions;
phpPackages = php.packages;
···
php74Extensions = recurseIntoAttrs php74.extensions;
php74Packages = recurseIntoAttrs php74.packages;
-
# Import PHP73 interpreter, extensions and packages
-
php73 = callPackage ../development/interpreters/php/7.3.nix {
-
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
-
};
-
php73Extensions = recurseIntoAttrs php73.extensions;
-
php73Packages = recurseIntoAttrs php73.packages;
-
picoc = callPackage ../development/interpreters/picoc {};
···
dspam = callPackage ../servers/mail/dspam { };
-
engelsystem = callPackage ../servers/web-apps/engelsystem { };
envoy = callPackage ../servers/http/envoy { };
···
lrzsz = callPackage ../tools/misc/lrzsz { };
-
lsp-plugins = callPackage ../applications/audio/lsp-plugins { };
luminanceHDR = libsForQt5.callPackage ../applications/graphics/luminance-hdr { };
···
}) arangodb_3_3 arangodb_3_4 arangodb_3_5;
arangodb = arangodb_3_4;
+
arcanist = callPackage ../development/tools/misc/arcanist { php = php74; };
arduino = arduino-core.override { withGui = true; };
···
# PHP interpreters, packages and extensions.
#
# Set default PHP interpreter, extensions and packages
+
php = php80;
phpExtensions = php.extensions;
phpPackages = php.packages;
···
php74Extensions = recurseIntoAttrs php74.extensions;
php74Packages = recurseIntoAttrs php74.packages;
picoc = callPackage ../development/interpreters/picoc {};
···
dspam = callPackage ../servers/mail/dspam { };
+
engelsystem = callPackage ../servers/web-apps/engelsystem { php = php74; };
envoy = callPackage ../servers/http/envoy { };
···
lrzsz = callPackage ../tools/misc/lrzsz { };
+
lsp-plugins = callPackage ../applications/audio/lsp-plugins { php = php74; };
luminanceHDR = libsForQt5.callPackage ../applications/graphics/luminance-hdr { };
+9 -71
pkgs/top-level/php-packages.nix
···
{ stdenv, lib, pkgs, fetchgit, phpPackage, autoconf, pkg-config, re2c
, gettext, bzip2, curl, libxml2, openssl, gmp, icu64, oniguruma, libsodium
-
, html-tidy, libzip, zlib, pcre, pcre2, libxslt, aspell, openldap, cyrus_sasl
, uwimap, pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng
, freetype, libffi, freetds, postgresql, sqlite, net-snmp, unixODBC, libedit
, readline, rsync, fetchpatch, valgrind
···
pname = "php-${pname}";
});
-
pcre' = if (lib.versionAtLeast php.version "7.3") then pcre2 else pcre;
-
php = phpPackage;
# This is a set of interactive tools based on PHP.
···
box = callPackage ../development/php-packages/box { };
composer = callPackage ../development/php-packages/composer { };
-
-
composer1 = callPackage ../development/php-packages/composer/1.x.nix { };
deployer = callPackage ../development/php-packages/deployer { };
···
pcov = callPackage ../development/php-packages/pcov { };
-
pcs = buildPecl {
-
version = "1.3.3";
-
pname = "pcs";
-
-
sha256 = "0d4p1gpl8gkzdiv860qzxfz250ryf0wmjgyc8qcaaqgkdyh5jy5p";
-
-
internalDeps = [ php.extensions.tokenizer ];
-
-
meta.maintainers = lib.teams.php.members;
-
meta.broken = lib.versionAtLeast php.version "7.3"; # Runtime failure on 7.3, build error on 7.4
-
};
-
pdo_oci = buildPecl rec {
inherit (php.unwrapped) src version;
···
pinba = callPackage ../development/php-packages/pinba { };
protobuf = callPackage ../development/php-packages/protobuf { };
-
-
pthreads = callPackage ../development/php-packages/pthreads { };
rdkafka = callPackage ../development/php-packages/rdkafka { };
···
swoole = callPackage ../development/php-packages/swoole { };
-
v8 = buildPecl {
-
version = "0.2.2";
-
pname = "v8";
-
-
sha256 = "103nys7zkpi1hifqp9miyl0m1mn07xqshw3sapyz365nb35g5q71";
-
-
buildInputs = [ pkgs.v8 ];
-
configureFlags = [ "--with-v8=${pkgs.v8}" ];
-
-
meta.maintainers = lib.teams.php.members;
-
meta.broken = true;
-
};
-
-
v8js = buildPecl {
-
version = "2.1.0";
-
pname = "v8js";
-
-
sha256 = "0g63dyhhicngbgqg34wl91nm3556vzdgkq19gy52gvmqj47rj6rg";
-
-
buildInputs = [ pkgs.v8 ];
-
configureFlags = [ "--with-v8js=${pkgs.v8}" ];
-
-
meta.maintainers = lib.teams.php.members;
-
meta.broken = true;
-
};
-
xdebug = callPackage ../development/php-packages/xdebug { };
yaml = callPackage ../development/php-packages/yaml { };
-
-
zmq = buildPecl {
-
version = "1.1.3";
-
pname = "zmq";
-
-
sha256 = "1kj487vllqj9720vlhfsmv32hs2dy2agp6176mav6ldx31c3g4n4";
-
-
configureFlags = [
-
"--with-zmq=${pkgs.zeromq}"
-
];
-
-
nativeBuildInputs = [ pkgs.pkg-config ];
-
-
meta.maintainers = lib.teams.php.members;
-
meta.broken = lib.versionAtLeast php.version "7.3";
-
};
} // (let
# Function to build a single php extension based on the php version.
#
···
doCheck = false; }
{ name = "exif"; doCheck = false; }
{ name = "ffi"; buildInputs = [ libffi ]; enable = lib.versionAtLeast php.version "7.4"; }
-
{ name = "fileinfo"; buildInputs = [ pcre' ]; }
-
{ name = "filter"; buildInputs = [ pcre' ]; }
{ name = "ftp"; buildInputs = [ openssl ]; }
{ name = "gd";
buildInputs = [ zlib gd ];
···
];
doCheck = false; }
{ name = "imap";
-
buildInputs = [ uwimap openssl pam pcre' ];
configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ];
# uwimap doesn't build on darwin.
enable = (!stdenv.isDarwin); }
-
# interbase (7.3, 7.2)
{ name = "intl";
buildInputs = [ icu64 ];
patches = lib.optionals (lib.versionOlder php.version "7.4") [
···
];
doCheck = false; }
{ name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
-
pcre'
]; doCheck = false; }
{ name = "mysqli";
internalDeps = [ php.extensions.mysqlnd ];
···
# oci8 (7.4, 7.3, 7.2)
# odbc (7.4, 7.3, 7.2)
{ name = "opcache";
-
buildInputs = [ pcre' ] ++ lib.optionals (!stdenv.isDarwin && lib.versionAtLeast php.version "8.0") [
valgrind.dev
];
patches = lib.optionals (lib.versionOlder php.version "7.4") [
···
configureFlags = [ "--with-pdo-sqlite=${sqlite.dev}" ];
doCheck = false; }
{ name = "pgsql";
-
buildInputs = [ pcre' ];
configureFlags = [ "--with-pgsql=${postgresql}" ];
doCheck = false; }
{ name = "posix"; doCheck = false; }
···
'';
doCheck = false;
}
-
# recode (7.3, 7.2)
{ name = "session"; doCheck = !(lib.versionAtLeast php.version "8.0"); }
{ name = "shmop"; }
{ name = "simplexml";
-
buildInputs = [ libxml2 pcre' ];
configureFlags = [ "--enable-simplexml" ]
# Required to build on darwin.
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
···
configureFlags = [ "--with-xsl=${libxslt.dev}" ]; }
{ name = "zend_test"; }
{ name = "zip";
-
buildInputs = [ libzip pcre' ];
configureFlags = [ "--with-zip" ]
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ];
···
{ stdenv, lib, pkgs, fetchgit, phpPackage, autoconf, pkg-config, re2c
, gettext, bzip2, curl, libxml2, openssl, gmp, icu64, oniguruma, libsodium
+
, html-tidy, libzip, zlib, pcre2, libxslt, aspell, openldap, cyrus_sasl
, uwimap, pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng
, freetype, libffi, freetds, postgresql, sqlite, net-snmp, unixODBC, libedit
, readline, rsync, fetchpatch, valgrind
···
pname = "php-${pname}";
});
php = phpPackage;
# This is a set of interactive tools based on PHP.
···
box = callPackage ../development/php-packages/box { };
composer = callPackage ../development/php-packages/composer { };
deployer = callPackage ../development/php-packages/deployer { };
···
pcov = callPackage ../development/php-packages/pcov { };
pdo_oci = buildPecl rec {
inherit (php.unwrapped) src version;
···
pinba = callPackage ../development/php-packages/pinba { };
protobuf = callPackage ../development/php-packages/protobuf { };
rdkafka = callPackage ../development/php-packages/rdkafka { };
···
swoole = callPackage ../development/php-packages/swoole { };
xdebug = callPackage ../development/php-packages/xdebug { };
yaml = callPackage ../development/php-packages/yaml { };
} // (let
# Function to build a single php extension based on the php version.
#
···
doCheck = false; }
{ name = "exif"; doCheck = false; }
{ name = "ffi"; buildInputs = [ libffi ]; enable = lib.versionAtLeast php.version "7.4"; }
+
{ name = "fileinfo"; buildInputs = [ pcre2 ]; }
+
{ name = "filter"; buildInputs = [ pcre2 ]; }
{ name = "ftp"; buildInputs = [ openssl ]; }
{ name = "gd";
buildInputs = [ zlib gd ];
···
];
doCheck = false; }
{ name = "imap";
+
buildInputs = [ uwimap openssl pam pcre2 ];
configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ];
# uwimap doesn't build on darwin.
enable = (!stdenv.isDarwin); }
{ name = "intl";
buildInputs = [ icu64 ];
patches = lib.optionals (lib.versionOlder php.version "7.4") [
···
];
doCheck = false; }
{ name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
+
pcre2
]; doCheck = false; }
{ name = "mysqli";
internalDeps = [ php.extensions.mysqlnd ];
···
# oci8 (7.4, 7.3, 7.2)
# odbc (7.4, 7.3, 7.2)
{ name = "opcache";
+
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin && lib.versionAtLeast php.version "8.0") [
valgrind.dev
];
patches = lib.optionals (lib.versionOlder php.version "7.4") [
···
configureFlags = [ "--with-pdo-sqlite=${sqlite.dev}" ];
doCheck = false; }
{ name = "pgsql";
+
buildInputs = [ pcre2 ];
configureFlags = [ "--with-pgsql=${postgresql}" ];
doCheck = false; }
{ name = "posix"; doCheck = false; }
···
'';
doCheck = false;
}
{ name = "session"; doCheck = !(lib.versionAtLeast php.version "8.0"); }
{ name = "shmop"; }
{ name = "simplexml";
+
buildInputs = [ libxml2 pcre2 ];
configureFlags = [ "--enable-simplexml" ]
# Required to build on darwin.
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
···
configureFlags = [ "--with-xsl=${libxslt.dev}" ]; }
{ name = "zend_test"; }
{ name = "zip";
+
buildInputs = [ libzip pcre2 ];
configureFlags = [ "--with-zip" ]
++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ];