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:
Fabian Schmitthenner 2017-02-26 13:29:46 +01:00 committed by Robin Gloster
parent 78d9414ce5
commit ae67f060f2

View File

@ -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 {