diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2024-04-16 10:29:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 10:29:50 +0200 |
commit | dac28df361035b4a7a4530e4fc0d26f3c5805774 (patch) | |
tree | 2c10b948f5c660608c8ca21745a4debc65abda1b /nixos/modules/services/web-apps | |
parent | 3ac9a64ef36e542e209b8ef2b07ff0c9840c40a4 (diff) | |
parent | a6c356974a22f7d8f8beb3064beb587c3504a85a (diff) |
Merge pull request #304370 from SuperSandro2000/mediawiki-php
nixos/mediawiki: use the same php everywhere
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r-- | nixos/modules/services/web-apps/mediawiki.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index a9a0aecb946e..7246fd93a231 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -18,6 +18,9 @@ let cacheDir = "/var/cache/mediawiki"; stateDir = "/var/lib/mediawiki"; + # https://www.mediawiki.org/wiki/Compatibility + php = pkgs.php81; + pkg = pkgs.stdenv.mkDerivation rec { pname = "mediawiki-full"; inherit (src) version; @@ -46,7 +49,7 @@ let } '' mkdir -p $out/bin for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do - makeWrapper ${pkgs.php}/bin/php $out/bin/mediawiki-$(basename $i .php) \ + makeWrapper ${php}/bin/php $out/bin/mediawiki-$(basename $i .php) \ --set MEDIAWIKI_CONFIG ${mediawikiConfig} \ --add-flags ${pkg}/share/mediawiki/maintenance/$i done @@ -485,8 +488,7 @@ in services.phpfpm.pools.mediawiki = { inherit user group; phpEnv.MEDIAWIKI_CONFIG = "${mediawikiConfig}"; - # https://www.mediawiki.org/wiki/Compatibility - phpPackage = pkgs.php81; + phpPackage = php; settings = (if (cfg.webserver == "apache") then { "listen.owner" = config.services.httpd.user; "listen.group" = config.services.httpd.group; @@ -598,8 +600,8 @@ in fi echo "exit( wfGetDB( DB_MASTER )->tableExists( 'user' ) ? 1 : 0 );" | \ - ${pkgs.php}/bin/php ${pkg}/share/mediawiki/maintenance/eval.php --conf ${mediawikiConfig} && \ - ${pkgs.php}/bin/php ${pkg}/share/mediawiki/maintenance/install.php \ + ${php}/bin/php ${pkg}/share/mediawiki/maintenance/eval.php --conf ${mediawikiConfig} && \ + ${php}/bin/php ${pkg}/share/mediawiki/maintenance/install.php \ --confpath /tmp \ --scriptpath / \ --dbserver ${lib.escapeShellArg dbAddr} \ @@ -613,7 +615,7 @@ in ${lib.escapeShellArg cfg.name} \ admin - ${pkgs.php}/bin/php ${pkg}/share/mediawiki/maintenance/update.php --conf ${mediawikiConfig} --quick + ${php}/bin/php ${pkg}/share/mediawiki/maintenance/update.php --conf ${mediawikiConfig} --quick ''; serviceConfig = { |