Skip to content

Commit

Permalink
Merge pull request #59861 from aanderse/libapreq2
Browse files Browse the repository at this point in the history
perlPackages.libapreq2: install the perl & apache modules
  • Loading branch information
aanderse committed Apr 20, 2019
2 parents 77dbfa3 + 2f25d58 commit ca40b73
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions pkgs/top-level/perl-packages.nix
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit ca40b73

Please sign in to comment.