diff options
author | Fabian Schmitthenner <github.fabian@schmitthenner.eu> | 2017-02-26 13:29:46 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-02-26 23:35:12 +0100 |
commit | ae67f060f28028c31b091460167bb598bd8d3e6d (patch) | |
tree | 7640976afd837d6199d0c14a1a726487ecfd7948 /nixos/modules/services/web-servers/phpfpm | |
parent | 78d9414ce534e570853fa3b7920c0906db9f169b (diff) | |
download | nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar.gz nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar.bz2 nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar.lz nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar.xz nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.tar.zst nixlib-ae67f060f28028c31b091460167bb598bd8d3e6d.zip |
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.
Diffstat (limited to 'nixos/modules/services/web-servers/phpfpm')
-rw-r--r-- | nixos/modules/services/web-servers/phpfpm/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix index ed537e7122a2..2471a06a3b07 100644 --- a/nixos/modules/services/web-servers/phpfpm/default.nix +++ b/nixos/modules/services/web-servers/phpfpm/default.nix @@ -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 { |