depot/third_party/nixpkgs/pkgs/servers/web-apps/mediawiki/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

39 lines
1 KiB
Nix

{ lib, stdenvNoCC, fetchurl, nixosTests }:
stdenvNoCC.mkDerivation rec {
pname = "mediawiki";
version = "1.42.1";
src = fetchurl {
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
hash = "sha256-7IevlaNd0Jw01S4CeVZSoDCrcpVeQx8IynIqc3N+ulM=";
};
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 = "Collaborative editing software that runs Wikipedia";
license = licenses.gpl2Plus;
homepage = "https://www.mediawiki.org/";
platforms = platforms.all;
maintainers = with maintainers; [ ] ++ teams.c3d2.members;
};
}