luarocks

How can I install lua rocks from a manifest file?


I come from a python background and I'm hoping to do something semantically equivalent to pip install -r requirements.txt to install a list of Python packages at the right version.

Is this achievable with luarocks? If not, is there a way to hack this together on the command line?


Solution

  • The system in Lua is a little different. There is a rockspec manifest file associated with every package. You can list your package dependencies here in this file and you can install then using

    "luarocks install name.rockspec".

    For more details, visit Luarocks

    More on Rockspec format here

    Instruction for creating a package/rock here