Unverified Commit d0cc7501 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

mediawiki: 1.45.1 -> 1.45.3 (#509590)

parents 605b6a04 24b5fad6
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchpatch,
  fetchurl,
  nixosTests,
}:

stdenvNoCC.mkDerivation rec {
  pname = "mediawiki";
  version = "1.45.1";
  version = "1.45.3";

  src = fetchurl {
    url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
    hash = "sha256-4vEmsZrsQiBRoKUODGq36QTzOzmIpHudqK+/0MCiUsw=";
    hash = "sha256-XqjB8yHJ+Nuk0aweTsoYJ/sTUZ1KIZDiOfUUMgWKQmk=";
  };

  patches = [
    # Fix installation with postgres
    (fetchpatch {
      url = "https://gerrit.wikimedia.org/r/changes/mediawiki%2Fcore~1231289/revisions/4/patch?download";
      decode = "base64 -d";
      postFetch = ''
        substituteInPlace $out \
          --replace "/Installer/" "/installer/"
      '';
      hash = "sha256-bhfw5CW4EEpr2GTGda3va+EmM/vK6AqBfyoCcsSiqNQ=";
    })
  ];

  postPatch = ''
    substituteInPlace includes/installer/CliInstaller.php \
      --replace-fail '$vars = Installer::getExistingLocalSettings();' '$vars = null;'