2023-05-16 21:18:47 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, nixosTests }:
|
2019-06-06 01:17:38 +00:00
|
|
|
|
2023-05-16 21:18:47 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2019-06-06 01:17:38 +00:00
|
|
|
pname = "mediawiki";
|
2024-06-29 12:39:23 +00:00
|
|
|
version = "1.42.1";
|
2019-06-06 01:17:38 +00:00
|
|
|
|
2022-06-22 18:05:02 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
|
2024-06-29 12:39:23 +00:00
|
|
|
hash = "sha256-7IevlaNd0Jw01S4CeVZSoDCrcpVeQx8IynIqc3N+ulM=";
|
2019-06-06 01:17:38 +00:00
|
|
|
};
|
|
|
|
|
2022-06-22 18:05:02 +00:00
|
|
|
postPatch = ''
|
2019-06-06 01:17:38 +00:00
|
|
|
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
|
|
|
|
'';
|
|
|
|
|
2023-05-16 21:18:47 +00:00
|
|
|
installPhase = ''
|
2019-06-06 01:17:38 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/mediawiki
|
|
|
|
cp -r * $out/share/mediawiki
|
2023-05-16 21:18:47 +00:00
|
|
|
echo "<?php
|
|
|
|
return require(getenv('MEDIAWIKI_CONFIG'));
|
|
|
|
?>" > $out/share/mediawiki/LocalSettings.php
|
2019-06-06 01:17:38 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-04-04 10:38:31 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.mediawiki) mysql postgresql;
|
|
|
|
};
|
2023-02-25 11:42:33 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-06 01:17:38 +00:00
|
|
|
description = "Collaborative editing software that runs Wikipedia";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
homepage = "https://www.mediawiki.org/";
|
|
|
|
platforms = platforms.all;
|
2022-06-22 18:05:02 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.c3d2.members;
|
2019-06-06 01:17:38 +00:00
|
|
|
};
|
|
|
|
}
|