1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #59861 from aanderse/libapreq2

perlPackages.libapreq2: install the perl & apache modules
This commit is contained in:
Aaron Andersen 2019-04-19 20:39:56 -04:00 committed by GitHub
commit ca40b73fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8187,7 +8187,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
@ -8198,11 +8198,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;