phpfpm: eliminate build at evaluation time
phpfpm currently uses `readFile` to read the php.ini file from the phpPackage. This causes php to be build at evaluation time. This eliminates the use of readFile and builds the php.ini at build time.
This commit is contained in:
parent
78d9414ce5
commit
ae67f060f2
@ -24,10 +24,11 @@ let
|
||||
${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)}
|
||||
'';
|
||||
|
||||
phpIni = pkgs.writeText "php.ini" ''
|
||||
${readFile "${cfg.phpPackage}/etc/php.ini"}
|
||||
|
||||
${cfg.phpOptions}
|
||||
phpIni = pkgs.runCommand "php.ini" {
|
||||
inherit (cfg) phpPackage phpOptions;
|
||||
passAsFile = [ "phpOptions" ];
|
||||
} ''
|
||||
cat $phpPackage/etc/php.ini $phpOptionsFile > $out
|
||||
'';
|
||||
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user