From 796b344e557895c5448e552898a808750d382835 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 3 Oct 2023 02:49:21 +0300 Subject: [PATCH] feat(core): Make it easier to add project-specific LuaRocks trees as dependencies --- core/pathsetup.lua.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/pathsetup.lua.in b/core/pathsetup.lua.in index b0994d4f2..1c2e0f59c 100644 --- a/core/pathsetup.lua.in +++ b/core/pathsetup.lua.in @@ -36,10 +36,8 @@ local function extendPaths (path, ours) prependCPath(path .. "/justenough/.libs") end prependPath(path .. "/lua-libraries") - if "@SYSTEM_LUAROCKS_FALSE@" == "" then -- see ./configure --with[out]-system-luarocks - prependCPath(path .. "/lua_modules/lib/lua/" .. luaversion) - prependPath(path .. "/lua_modules/share/lua/" .. luaversion) - end + prependCPath(path .. "/lib/lua/" .. luaversion) + prependPath(path .. "/share/lua/" .. luaversion) else prependCPath(path .. "/sile") prependPath(path .. "/sile") @@ -58,6 +56,9 @@ package.path = table.concat(luapath, ";") extendPaths("@SILE_PATH@", true) extendPaths("@SILE_LIB_PATH@", true) +if "@SYSTEM_LUAROCKS_FALSE@" == "" then -- see ./configure --with[out]-system-luarocks + extendPaths("@SILE_PATH@/lua_modules") +end package.path = table.concat(extpath, ";") .. ";" .. package.path