apacheHttpdPackages.mod_perl: add passthru.updateScript

This commit is contained in:
Anthony Roussel 2024-03-21 22:29:23 +01:00
parent 7b7a71ab01
commit 65759dbf08
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -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;
};
}