1{
2 apacheHttpd,
3 directoryListingUpdater,
4 fetchurl,
5 lib,
6 nixosTests,
7 perl,
8 stdenv,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "mod_perl";
13 version = "2.0.13";
14
15 src = fetchurl {
16 url = "mirror://apache/perl/${pname}-${version}.tar.gz";
17 sha256 = "sha256-reO+McRHuESIaf7N/KziWNbVh7jGx3PF8ic19w2C1to=";
18 };
19
20 buildInputs = [
21 apacheHttpd
22 perl
23 ];
24
25 buildPhase = ''
26 perl Makefile.PL \
27 MP_APXS=${apacheHttpd.dev}/bin/apxs
28 make
29 '';
30
31 installPhase = ''
32 mkdir -p $out
33 make install DESTDIR=$out
34 mv $out${apacheHttpd}/* $out
35 mv $out${apacheHttpd.dev}/* $out
36 mv $out${perl}/* $out
37 rm $out/nix -rf
38 '';
39
40 passthru = {
41 updateScript = directoryListingUpdater {
42 url = "https://archive.apache.org/dist/perl/";
43 };
44 tests = nixosTests.mod_perl;
45 };
46
47 __darwinAllowLocalNetworking = true;
48
49 meta = with lib; {
50 description = "Integration of perl with the Apache2 web server";
51 homepage = "https://perl.apache.org/download/index.html";
52 changelog = "https://github.com/apache/mod_perl/blob/trunk/Changes";
53 license = licenses.asl20;
54 mainProgram = "mp2bug";
55 maintainers = [ ];
56 platforms = platforms.unix;
57 };
58}