apacheHttpdPackages.mod_perl: init at 2.0.10

This commit is contained in:
Rok Garbas 2016-12-15 12:36:07 +01:00
parent 9f1880039f
commit e6fa6b21e1
3 changed files with 39 additions and 0 deletions

View File

@ -16,6 +16,8 @@ let
phpMajorVersion = head (splitString "." php.version);
mod_perl = pkgs.mod_perl.override { apacheHttpd = httpd; };
defaultListen = cfg: if cfg.enableSSL
then [{ip = "*"; port = 443;}]
else [{ip = "*"; port = 80;}];
@ -76,6 +78,7 @@ let
robotsEntries = "";
startupScript = "";
enablePHP = false;
enablePerl = false;
phpOptions = "";
options = {};
documentRoot = null;
@ -355,6 +358,7 @@ let
++ map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; }
++ optional enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
++ optional enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
++ concatMap (svc: svc.extraModules) allSubservices
++ extraForeignModules;
in concatMapStrings load allModules
@ -415,6 +419,8 @@ let
enablePHP = mainCfg.enablePHP || any (svc: svc.enablePHP) allSubservices;
enablePerl = mainCfg.enablePerl || any (svc: svc.enablePerl) allSubservices;
# Generate the PHP configuration file. Should probably be factored
# out into a separate module.
@ -579,6 +585,12 @@ in
'';
};
enablePerl = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Perl module (mod_perl).";
};
phpOptions = mkOption {
type = types.lines;
default = "";

View File

@ -0,0 +1,25 @@
{ stdenv, fetchurl, apacheHttpd, perl }:
stdenv.mkDerivation rec {
name = "mod_perl-2.0.10";
src = fetchurl {
url = "mirror://apache/perl/${name}.tar.gz";
sha256 = "0r1bhzwl5gr0202r6448943hjxsickzn55kdmb7dzad39vnq7kyi";
};
buildInputs = [ apacheHttpd perl ];
buildPhase = ''
perl Makefile.PL \
MP_APXS=${apacheHttpd.dev}/bin/apxs
make
'';
installPhase = ''
mkdir -p $out
make install DESTDIR=$out
mv $out${apacheHttpd}/* $out
mv $out${apacheHttpd.dev}/* $out
mv $out${perl}/* $out
rm $out/nix -rf
'';
}

View File

@ -10005,6 +10005,8 @@ in
mod_evasive = callPackage ../servers/http/apache-modules/mod_evasive { };
mod_perl = callPackage ../servers/http/apache-modules/mod_perl { };
mod_fastcgi = callPackage ../servers/http/apache-modules/mod_fastcgi { };
mod_python = callPackage ../servers/http/apache-modules/mod_python { };