41abb0383c
Release notes: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/1.35.1/RELEASE-NOTES-1.35 Main motivation is to pull the security fixes for: * CVE-2020-35474 * CVE-2020-35478 * CVE-2020-35479 * CVE-2020-35477 * CVE-2020-35480
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ lib, stdenv, fetchurl, makeWrapper, writeText }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mediawiki";
|
|
version = "1.35.1";
|
|
|
|
src = with lib; fetchurl {
|
|
url = "https://releases.wikimedia.org/mediawiki/${versions.majorMinor version}/${pname}-${version}.tar.gz";
|
|
sha256 = "05g3mgyi789drhzk3wclkyw4f06mz21q90m2c0z6zshn98fscrcf";
|
|
};
|
|
|
|
prePatch = ''
|
|
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
|
|
'';
|
|
|
|
phpConfig = writeText "LocalSettings.php" ''
|
|
<?php
|
|
return require(getenv('MEDIAWIKI_CONFIG'));
|
|
?>
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/mediawiki
|
|
cp -r * $out/share/mediawiki
|
|
cp ${phpConfig} $out/share/mediawiki/LocalSettings.php
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "The collaborative editing software that runs Wikipedia";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://www.mediawiki.org/";
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.redvers ];
|
|
};
|
|
}
|