3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #59910 from aanderse/libapreq2-backport

perlPackages.libapreq2: install the perl & apache modules (19.03 backport)
This commit is contained in:
Silvan Mosberger 2019-04-23 00:10:28 +02:00 committed by GitHub
commit 46379ddb8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8126,7 +8126,7 @@ let
};
outputs = [ "out" ];
buildInputs = [ pkgs.apacheHttpd pkgs.apr pkgs.aprutil ApacheTest ExtUtilsXSBuilder ];
propagatedBuildInputs = [ mod_perl2 ];
propagatedBuildInputs = [ (pkgs.apacheHttpdPackages.mod_perl.override { inherit perl; }) ];
makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd.dev} --with-apache2-apxs=${pkgs.apacheHttpd.dev}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd --with-apr-config=${pkgs.apr.dev}/bin/apr-1-config --with-apu-config=${pkgs.aprutil.dev}/bin/apu-1-config";
preConfigure = ''
# override broken prereq check
@ -8137,11 +8137,30 @@ let
'';
installPhase = ''
mkdir $out
# install the library
make install DESTDIR=$out
cp -r $out/${pkgs.apacheHttpd.dev}/. $out/.
cp -r $out/$out/. $out/.
# install the perl module
pushd glue/perl
perl Makefile.PL
make install DESTDIR=$out
cp -r $out/${perl}/lib/perl5 $out/lib/
popd
# install the apache module
# https://computergod.typepad.com/home/2007/06/webgui_and_suse.html
# NOTE: if using the apache module you must use "apreq" as the module name, not "apreq2"
# services.httpd.extraModules = [ { name = "apreq"; path = "''${pkgs.perlPackages.libapreq2}/modules/mod_apreq2.so"; } ];
pushd module
make install DESTDIR=$out
cp -r $out/${pkgs.apacheHttpd.out}/modules $out/
popd
rm -r $out/nix
'';
'';
doCheck = false; # test would need to start apache httpd
meta = {
license = stdenv.lib.licenses.asl20;