mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "mediawiki";
|
|
version = "1.45.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
|
|
hash = "sha256-y3yCRGjrWlEacvCOYpHQncivEuCg/9wlMu4/drsMrXw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace includes/installer/CliInstaller.php \
|
|
--replace-fail '$vars = Installer::getExistingLocalSettings();' '$vars = null;'
|
|
'';
|
|
|
|
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 = {
|
|
description = "Collaborative editing software that runs Wikipedia";
|
|
license = lib.licenses.gpl2Plus;
|
|
homepage = "https://www.mediawiki.org/";
|
|
platforms = lib.platforms.all;
|
|
maintainers = with lib.maintainers; [
|
|
# for the C3D2
|
|
SuperSandro2000
|
|
];
|
|
};
|
|
}
|