I am extremely happy to announce LuaRocks 3.0.0beta1, the
almost-finished package for the new major release of LuaRocks, the Lua
package manager.
With Buildroot (embedded linux), I run `configure --prefix=my_path`. The installed `luarocks` script is properly patched with : package.loaded['luarocks.core.hardcoded'] = { SYSCONFDIR = [[my_path/etc/luarocks]] }
cfg.init is called a first time by loaded.lua:19, SYSCONFDIR is present in luarocks.core.hardcoded, and the config file (my_path/etc/luarocks/config-5.3.lua) is successfully loaded.
At the end of loader.lua, package.loaded['luarocks.core.hardcoded'] is removed (with all others luarocks.*).
cfg.init is called a second time by cmd.lua:364, but now the config file is not found.
A workaround is to set the environment variable LUAROCKS_SYSCONFDIR with my_path/etc/luarocks.
With this workaround, rocks are successfully built (including cross-compilation).
But I think that the condition in loader.lua:267 must be inverted.