mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
php.buildEnv: Add phpIni attribute for easy access to the php.ini
This commit is contained in:
parent
d61040716e
commit
c3d5d92f4a
@ -338,7 +338,7 @@ let
|
||||
}
|
||||
''
|
||||
cat ${php}/etc/php.ini > $out
|
||||
cat ${php}/lib/custom-php.ini > $out
|
||||
cat ${php.phpIni} > $out
|
||||
echo "$options" >> $out
|
||||
'';
|
||||
|
||||
|
@ -105,7 +105,7 @@ let
|
||||
(enabledExtensions ++ (getDepsRecursively enabledExtensions)));
|
||||
|
||||
extNames = map getExtName enabledExtensions;
|
||||
extraInit = writeText "custom-php.ini" ''
|
||||
extraInit = writeText "php.ini" ''
|
||||
${lib.concatStringsSep "\n"
|
||||
(lib.textClosureList extensionTexts extNames)}
|
||||
${extraConfig}
|
||||
@ -118,11 +118,12 @@ let
|
||||
passthru = {
|
||||
buildEnv = mkBuildEnv allArgs allExtensionFunctions;
|
||||
withExtensions = mkWithExtensions allArgs allExtensionFunctions;
|
||||
phpIni = "${phpWithExtensions}/lib/php.ini";
|
||||
inherit (php-packages) packages extensions;
|
||||
};
|
||||
paths = [ php ];
|
||||
postBuild = ''
|
||||
cp ${extraInit} $out/lib/custom-php.ini
|
||||
cp ${extraInit} $out/lib/php.ini
|
||||
|
||||
wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user