diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-04-15 22:59:37 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-04-15 23:02:26 +0200 |
commit | a6c356974a22f7d8f8beb3064beb587c3504a85a (patch) | |
tree | 826f0237e3fd02fd36e63de1df80c9b65ef9c12a /nixos/modules/services/web-apps | |
parent | 1f54fa2ddf2623784a2b4431b35a1b5ce91a14bf (diff) |
nixos/mediawiki: use the same php everywhere
otherwise we might end up with eg: php 8.1 and php 8.2 mixed
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 = { |