Merge pull request #108511 from nagy/apache-lua-path-fix

nixos/httpd: fix lua paths
This commit is contained in:
Mario Rodas 2021-02-11 20:04:42 -05:00 committed by GitHub
commit ffedd32f9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,10 +126,14 @@ let
</IfModule>
'';
luaSetPaths = ''
luaSetPaths = let
# support both lua and lua.withPackages derivations
luaversion = cfg.package.lua5.lua.luaversion or cfg.package.lua5.luaversion;
in
''
<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
LuaPackageCPath ${cfg.package.lua5}/lib/lua/${luaversion}/?.so
LuaPackagePath ${cfg.package.lua5}/share/lua/${luaversion}/?.lua
</IfModule>
'';
@ -333,7 +337,7 @@ let
${sslConf}
${if cfg.package.luaSupport then luaSetPaths else ""}
${optionalString cfg.package.luaSupport luaSetPaths}
# Fascist default - deny access to everything.
<Directory />