Unverified Commit 7cfc7d65 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

nixos/mediawiki: fix installer when using postgres with unix domain sockets

parent 320ee91c
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchpatch,
  fetchurl,
  nixosTests,
}:
@@ -14,6 +15,19 @@ stdenvNoCC.mkDerivation rec {
    hash = "sha256-1Jm8frPXGDXCvsHJyu2IoDCK7DfwcmTnURDSor7wJTQ=";
  };

  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;'