Merge pull request #232302 from SuperSandro2000/mediawiki-nocc

mediawiki: use stdenvNoCC, remove extra derivation
This commit is contained in:
Sandro 2023-06-27 18:14:36 +02:00 committed by GitHub
commit c13fd6a3d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, writeText, nixosTests }:
{ lib, stdenvNoCC, fetchurl, nixosTests }:
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation rec {
pname = "mediawiki";
version = "1.39.3";
@ -13,18 +13,14 @@ stdenv.mkDerivation rec {
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
'';
installPhase = let
phpConfig = writeText "LocalSettings.php" ''
<?php
return require(getenv('MEDIAWIKI_CONFIG'));
?>
'';
in ''
installPhase = ''
runHook preInstall
mkdir -p $out/share/mediawiki
cp -r * $out/share/mediawiki
cp ${phpConfig} $out/share/mediawiki/LocalSettings.php
echo "<?php
return require(getenv('MEDIAWIKI_CONFIG'));
?>" > $out/share/mediawiki/LocalSettings.php
runHook postInstall
'';