Merge pull request #108511 from nagy/apache-lua-path-fix
nixos/httpd: fix lua paths
This commit is contained in:
commit
ffedd32f9f
|
@ -126,10 +126,14 @@ let
|
||||||
</IfModule>
|
</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>
|
<IfModule mod_lua.c>
|
||||||
LuaPackageCPath ${cfg.package.lua5}/lib/lua/${cfg.package.lua5.lua.luaversion}/?.so
|
LuaPackageCPath ${cfg.package.lua5}/lib/lua/${luaversion}/?.so
|
||||||
LuaPackagePath ${cfg.package.lua5}/share/lua/${cfg.package.lua5.lua.luaversion}/?.lua
|
LuaPackagePath ${cfg.package.lua5}/share/lua/${luaversion}/?.lua
|
||||||
</IfModule>
|
</IfModule>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -333,7 +337,7 @@ let
|
||||||
|
|
||||||
${sslConf}
|
${sslConf}
|
||||||
|
|
||||||
${if cfg.package.luaSupport then luaSetPaths else ""}
|
${optionalString cfg.package.luaSupport luaSetPaths}
|
||||||
|
|
||||||
# Fascist default - deny access to everything.
|
# Fascist default - deny access to everything.
|
||||||
<Directory />
|
<Directory />
|
||||||
|
|
Loading…
Reference in a new issue