From ae67f060f28028c31b091460167bb598bd8d3e6d Mon Sep 17 00:00:00 2001 From: Fabian Schmitthenner Date: Sun, 26 Feb 2017 13:29:46 +0100 Subject: 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. --- nixos/modules/services/web-servers/phpfpm/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services') diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix index ed537e7122a..2471a06a3b0 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 { -- cgit 1.4.1