diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/web-apps/mediawiki/default.nix | 39 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/servers/web-apps/mediawiki/default.nix b/pkgs/servers/web-apps/mediawiki/default.nix new file mode 100644 index 0000000000000..e526afe661cf4 --- /dev/null +++ b/pkgs/servers/web-apps/mediawiki/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, makeWrapper, writeText }: + +stdenv.mkDerivation rec { + pname = "mediawiki"; + version = "1.33.0"; + + src = with stdenv.lib; fetchurl { + url = "https://releases.wikimedia.org/mediawiki/${versions.majorMinor version}/${pname}-${version}.tar.gz"; + sha256 = "0rydzmr64r3p5n6g8v9rifk277z1v31p82s8ka8xap8cfkca4dc3"; + }; + + 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 stdenv.lib; { + description = "The collaborative editing software that runs Wikipedia"; + license = licenses.gpl2Plus; + homepage = "https://www.mediawiki.org/"; + platforms = platforms.all; + maintainers = [ maintainers.redvers ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 851af7b0a0558..0a3153de5e68e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4611,6 +4611,8 @@ in }; }; + mediawiki = callPackage ../servers/web-apps/mediawiki { }; + memtier-benchmark = callPackage ../tools/networking/memtier-benchmark { }; memtest86-efi = callPackage ../tools/misc/memtest86-efi { }; |