From 65759dbf08519483c1d2a311a8fd2bc715b2a3f4 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Thu, 21 Mar 2024 22:29:23 +0100 Subject: apacheHttpdPackages.mod_perl: add passthru.updateScript --- .../http/apache-modules/mod_perl/default.nix | 35 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/http/apache-modules/mod_perl/default.nix b/pkgs/servers/http/apache-modules/mod_perl/default.nix index 1c150b7f957b..002cfef2505f 100644 --- a/pkgs/servers/http/apache-modules/mod_perl/default.nix +++ b/pkgs/servers/http/apache-modules/mod_perl/default.nix @@ -1,4 +1,12 @@ -{ stdenv, fetchurl, apacheHttpd, perl, nixosTests }: +{ + apacheHttpd, + directoryListingUpdater, + fetchurl, + lib, + nixosTests, + perl, + stdenv, +}: stdenv.mkDerivation rec { pname = "mod_perl"; @@ -9,12 +17,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-9bghtZsP3JZw5G7Q/PMtiRHyUSYYmotowWUvkiHu4mk="; }; - buildInputs = [ apacheHttpd perl ]; + buildInputs = [ + apacheHttpd + perl + ]; + buildPhase = '' perl Makefile.PL \ MP_APXS=${apacheHttpd.dev}/bin/apxs make ''; + installPhase = '' mkdir -p $out make install DESTDIR=$out @@ -24,6 +37,20 @@ stdenv.mkDerivation rec { rm $out/nix -rf ''; - passthru.tests = nixosTests.mod_perl; - meta.mainProgram = "mp2bug"; + passthru = { + updateScript = directoryListingUpdater { + url = "https://archive.apache.org/dist/perl/"; + }; + tests = nixosTests.mod_perl; + }; + + meta = with lib; { + description = "Integration of perl with the Apache2 web server"; + homepage = "https://perl.apache.org/download/index.html"; + changelog = "https://github.com/apache/mod_perl/blob/trunk/Changes"; + license = licenses.asl20; + mainProgram = "mp2bug"; + maintainers = with maintainers; [ ]; + platforms = platforms.unix; + }; } -- cgit 1.4.1