306fa4f55d
https://lists.wikimedia.org/hyperkitty/list/mediawiki-announce@lists.wikimedia.org/message/HVT3U3XYY35PSCIQPHMY4VQNF3Q6MHUO/ Fixes: CVE-2023-29197, CVE-2023-36674, CVE-2023-36675
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenvNoCC, fetchurl, nixosTests }:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "mediawiki";
|
|
version = "1.40.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
|
|
hash = "sha256-6cSHdxhpjwgtgJbYqdFs2a6yHuGYKj2LRgOvfP0VitQ=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/mediawiki
|
|
cp -r * $out/share/mediawiki
|
|
echo "<?php
|
|
return require(getenv('MEDIAWIKI_CONFIG'));
|
|
?>" > $out/share/mediawiki/LocalSettings.php
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests.mediawiki) mysql postgresql;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "The collaborative editing software that runs Wikipedia";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://www.mediawiki.org/";
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ ] ++ teams.c3d2.members;
|
|
};
|
|
}
|