mediawiki: use stdenvNoCC, remove extra derivation

This commit is contained in:
Sandro Jäckel 2023-05-16 23:18:47 +02:00
parent d4ee9275ce
commit 0000000877
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

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