Merge pull request #107649 from nagy/apache-lua-paths

apacheHttpd, nixos/httpd: set lua paths
This commit is contained in:
Peter Simons 2020-12-26 18:50:31 +01:00 committed by GitHub
commit 676b7d589f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -126,6 +126,13 @@ let
</IfModule> </IfModule>
''; '';
luaSetPaths = ''
<IfModule mod_lua.c>
LuaPackageCPath ${cfg.package.lua5}/lib/lua/${cfg.package.lua5.lua.luaversion}/?.so
LuaPackagePath ${cfg.package.lua5}/share/lua/${cfg.package.lua5.lua.luaversion}/?.lua
</IfModule>
'';
mkVHostConf = hostOpts: mkVHostConf = hostOpts:
let let
adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else cfg.adminAddr; adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else cfg.adminAddr;
@ -326,6 +333,8 @@ let
${sslConf} ${sslConf}
${if cfg.package.luaSupport then luaSetPaths else ""}
# Fascist default - deny access to everything. # Fascist default - deny access to everything.
<Directory /> <Directory />
Options FollowSymLinks Options FollowSymLinks

View File

@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
''; '';
passthru = { passthru = {
inherit apr aprutil sslSupport proxySupport ldapSupport; inherit apr aprutil sslSupport proxySupport ldapSupport luaSupport lua5;
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {