Merge pull request #89132 from talyz/php-buildenv-keep-extensions

php.buildEnv: Let enabled extensions to pass through by default
This commit is contained in:
Maximilian Bosch 2020-05-29 13:03:43 +02:00 committed by GitHub
commit 4eb9c62591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ let
# consecutive calls to buildEnv and overrides to work as
# expected.
mkBuildEnv = prevArgs: prevExtensionFunctions: lib.makeOverridable (
{ extensions ? ({...}: []), extraConfig ? "", ... }@innerArgs:
{ extensions ? ({ enabled, ... }: enabled), extraConfig ? "", ... }@innerArgs:
let
allArgs = args // prevArgs // innerArgs;
filteredArgs = builtins.removeAttrs allArgs [ "extensions" "extraConfig" ];
@ -55,8 +55,8 @@ let
allExtensionFunctions = prevExtensionFunctions ++ [ extensions ];
enabledExtensions =
builtins.foldl'
(state: f:
f { enabled = state; all = php-packages.extensions; })
(enabled: f:
f { inherit enabled; all = php-packages.extensions; })
[]
allExtensionFunctions;