diff options
author | Elis Hirwing <elis@hirwing.se> | 2021-02-27 21:40:00 +0100 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2021-03-02 09:22:32 +0100 |
commit | 1216baaee11d203b857baeb5808d4220a1774068 (patch) | |
tree | 8e3b9eddd469ac83fea20a1b76d21b82032148bf /nixos | |
parent | c6f0a1db39eae371e81c4c46541e59dce828580a (diff) |
nixos/httpd: Fix httpd module for php8
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 7f50b8fd8d44..b2bb5055cd4c 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -22,7 +22,9 @@ let php = cfg.phpPackage.override { apacheHttpd = pkg; }; - phpMajorVersion = lib.versions.major (lib.getVersion php); + phpModuleName = let + majorVersion = lib.versions.major (lib.getVersion php); + in (if majorVersion == "8" then "php" else "php${majorVersion}"); mod_perl = pkgs.apacheHttpdPackages.mod_perl.override { apacheHttpd = pkg; }; @@ -63,7 +65,7 @@ let ++ optional enableSSL "ssl" ++ optional enableUserDir "userdir" ++ optional cfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; } - ++ optional cfg.enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; } + ++ optional cfg.enablePHP { name = phpModuleName; path = "${php}/modules/lib${phpModuleName}.so"; } ++ optional cfg.enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; } ++ cfg.extraModules; |