Merge pull request #115089 from Ma27/php-ext-fix
Revert "php: Add php package versions to extensions/packages pnames"
This commit is contained in:
commit
bc8532b8e6
@ -2,8 +2,14 @@
|
|||||||
, config ? {}
|
, config ? {}
|
||||||
, pkgs ? import ../../.. { inherit system config; }
|
, pkgs ? import ../../.. { inherit system config; }
|
||||||
, php ? pkgs.php
|
, php ? pkgs.php
|
||||||
}: {
|
}:
|
||||||
fpm = import ./fpm.nix { inherit system pkgs php; };
|
|
||||||
httpd = import ./httpd.nix { inherit system pkgs php; };
|
let
|
||||||
pcre = import ./pcre.nix { inherit system pkgs php; };
|
php' = php.buildEnv {
|
||||||
|
extensions = { enabled, all }: with all; enabled ++ [ apcu ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
fpm = import ./fpm.nix { inherit system pkgs; php = php'; };
|
||||||
|
httpd = import ./httpd.nix { inherit system pkgs; php = php'; };
|
||||||
|
pcre = import ./pcre.nix { inherit system pkgs; php = php'; };
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: {
|
|||||||
meta.maintainers = lib.teams.php.members;
|
meta.maintainers = lib.teams.php.members;
|
||||||
|
|
||||||
machine = { config, lib, pkgs, ... }: {
|
machine = { config, lib, pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ php ];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -48,7 +50,8 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: {
|
|||||||
assert "PHP Version ${php.version}" in response, "PHP version not detected"
|
assert "PHP Version ${php.version}" in response, "PHP version not detected"
|
||||||
|
|
||||||
# Check so we have database and some other extensions loaded
|
# Check so we have database and some other extensions loaded
|
||||||
for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite"]:
|
for ext in ["json", "opcache", "pdo_mysql", "pdo_pgsql", "pdo_sqlite", "apcu"]:
|
||||||
assert ext in response, f"Missing {ext} extension"
|
assert ext in response, f"Missing {ext} extension"
|
||||||
|
machine.succeed(f'test -n "$(php -m | grep -i {ext})"')
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
stdenv.mkDerivation (args // {
|
stdenv.mkDerivation (args // {
|
||||||
pname = "php-${php.version}-${pname}";
|
name = "php-${pname}-${version}";
|
||||||
extensionName = pname;
|
extensionName = pname;
|
||||||
|
|
||||||
inherit version src;
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook re2c ] ++ nativeBuildInputs;
|
nativeBuildInputs = [ autoreconfHook re2c ] ++ nativeBuildInputs;
|
||||||
buildInputs = [ php ] ++ peclDeps ++ buildInputs;
|
buildInputs = [ php ] ++ peclDeps ++ buildInputs;
|
||||||
|
@ -16,7 +16,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
|
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
|
||||||
# with how buildPecl does it and make the file easier to overview.
|
# with how buildPecl does it and make the file easier to overview.
|
||||||
mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // {
|
mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // {
|
||||||
pname = "php-${php.version}-${pname}";
|
pname = "php-${pname}";
|
||||||
});
|
});
|
||||||
|
|
||||||
pcre' = if (lib.versionAtLeast php.version "7.3") then pcre2 else pcre;
|
pcre' = if (lib.versionAtLeast php.version "7.3") then pcre2 else pcre;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user