nixos/phpfpm: Add option to set PHP package.

This allows to easily override the used PHP package, especially for
example if you want to use PHP 5.5 or if you want to override the
derivation.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-04-10 07:52:26 +02:00
parent 9dcffe951d
commit 5dd14a1059
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -35,6 +35,13 @@ in {
'';
};
phpPackage = mkOption {
default = pkgs.php54;
description = ''
The PHP package to use for running the FPM service.
'';
};
poolConfigs = mkOption {
type = types.attrsOf types.lines;
default = {};
@ -68,7 +75,7 @@ in {
mkdir -p "${stateDir}"
'';
serviceConfig = {
ExecStart = "${pkgs.php54}/sbin/php-fpm -y ${cfgFile}";
ExecStart = "${cfg.phpPackage}/sbin/php-fpm -y ${cfgFile}";
PIDFile = pidFile;
};
};