php: split php.packages to php.packages and php.extensions
So now we have only packages for human interaction in php.packages and only extensions in php.extensions. With this php.packages.exts have been merged into the same attribute set as all the other extensions to make it flat and nice. The nextcloud module have been updated to reflect this change as well as the documentation.
This commit is contained in:
@@ -149,14 +149,21 @@ let
|
||||
generic' = { version, sha256, self, selfWithExtensions, ... }@args:
|
||||
let
|
||||
php = generic (builtins.removeAttrs args [ "self" "selfWithExtensions" ]);
|
||||
packages = callPackage ../../../top-level/php-packages.nix {
|
||||
|
||||
packages = (callPackage ../../../top-level/php-packages.nix {
|
||||
php = self;
|
||||
phpWithExtensions = selfWithExtensions;
|
||||
};
|
||||
}).packages;
|
||||
|
||||
extensions = (callPackage ../../../top-level/php-packages.nix {
|
||||
php = self;
|
||||
phpWithExtensions = selfWithExtensions;
|
||||
}).extensions;
|
||||
|
||||
buildEnv = { exts ? (_: []), extraConfig ? "" }:
|
||||
let
|
||||
getExtName = ext: lib.removePrefix "php-" (builtins.parseDrvName ext.name).name;
|
||||
extList = exts packages;
|
||||
extList = exts extensions;
|
||||
|
||||
# Generate extension load configuration snippets from
|
||||
# exts. This is an attrset suitable for use with
|
||||
@@ -190,7 +197,7 @@ let
|
||||
inherit version;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
passthru = {
|
||||
inherit buildEnv packages;
|
||||
inherit buildEnv packages extensions;
|
||||
};
|
||||
paths = [ php ];
|
||||
postBuild = ''
|
||||
@@ -206,7 +213,7 @@ let
|
||||
in
|
||||
php.overrideAttrs (_: {
|
||||
passthru = {
|
||||
inherit buildEnv packages;
|
||||
inherit buildEnv packages extensions;
|
||||
};
|
||||
});
|
||||
|
||||
@@ -238,7 +245,7 @@ let
|
||||
};
|
||||
|
||||
defaultPhpExtensions = {
|
||||
exts = pp: with pp.exts; ([
|
||||
exts = pp: with pp; ([
|
||||
bcmath calendar curl ctype dom exif fileinfo filter ftp gd
|
||||
gettext gmp iconv intl json ldap mbstring mysqli mysqlnd opcache
|
||||
openssl pcntl pdo pdo_mysql pdo_odbc pdo_pgsql pdo_sqlite pgsql
|
||||
|
||||
Reference in New Issue
Block a user