tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
apache-httpd: add phpPackage option
Eric Sagnes
9 years ago
ff074ec7
d254e4de
+13
-2
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
web-servers
apache-httpd
default.nix
+13
-2
nixos/modules/services/web-servers/apache-httpd/default.nix
···
12
12
13
13
httpdConf = mainCfg.configFile;
14
14
15
15
-
php = pkgs.php.override { apacheHttpd = httpd.dev; /* otherwise it only gets .out */ };
15
15
+
php = mainCfg.phpPackage.override { apacheHttpd = httpd.dev; /* otherwise it only gets .out */ };
16
16
+
17
17
+
phpMajorVersion = head (splitString "." php.version);
16
18
17
19
getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
18
20
···
338
340
concatMap (svc: svc.extraModulesPre) allSubservices
339
341
++ map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
340
342
++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; }
341
341
-
++ optional enablePHP { name = "php5"; path = "${php}/modules/libphp5.so"; }
343
343
+
++ optional enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
342
344
++ concatMap (svc: svc.extraModules) allSubservices
343
345
++ extraForeignModules;
344
346
in concatMapStrings load allModules
···
552
554
type = types.bool;
553
555
default = false;
554
556
description = "Whether to enable the PHP module.";
557
557
+
};
558
558
+
559
559
+
phpPackage = mkOption {
560
560
+
type = types.package;
561
561
+
default = pkgs.php;
562
562
+
defaultText = "pkgs.php";
563
563
+
description = ''
564
564
+
Overridable attribute of the PHP package to use.
565
565
+
'';
555
566
};
556
567
557
568
phpOptions = mkOption {