Search code examples
luarocks

Is the exact lua binary able to be specified in the luarocks compilation options?


Right now I have to create a symlink to the lua runtime I'm using:

ln -s $PREFIX/bin/lua-tarantool  $PREFIX/bin/tarantool

Then I have to use --lua-suffix="-tarantool" for the ./configure options.

Is there a way to specify the exact name of the binary without resorting to symbolic links? For example: --with-lua-bin=$PREFIX/bin/tarantool

I checked the options and there doesn't seem to be anything like that: https://github.com/keplerproject/luarocks/wiki/Installation-instructions-for-Unix#Customizing_your_settings


Solution

  • You can set the following in your ~/.luarocks/config.lua file:

    lua_interpreter = "/some_dir/bin/tarantool"
    variables = {
       LUA = "/some_dir/bin/tarantool"
    }
    

    You might need to tweak the first line of the luarocks script, though (or run it with tarantool /path/to/luarocks).

    But you can also ask yourself: do you need to run LuaRocks with tarantool? It should be possible to install plain Lua, LuaRocks and Tarantool, and configure LuaRocks to use plain Lua, but to install modules to the Tarantool path.