Module luarocks

Facade for interaction with LuaRocks.

Functions

build_and_install_rockspec (rockspec_file, proj_dir) Builds and installs local rock specified by the rockspec.
change_target_lua (api_ver, luajit_ver) Changes the target Lua version.
find_default_rockspec (proj_dir) Looks for the default rockspec file in the project's directory.
get_variable (name) Gets LuaRocks variable from cfg.variables table.
load_rockspec (rockspec_file) Loads the specified rockspec into a table.
set_link_static (enabled) Switches LuaRocks to use static or dynamic linking.
set_variable (name, value) Sets LuaRocks variable into cfg.variables table.
use_tree (dirname)

Fields

cfg The configuration table.
is_windows Do we run on Windows?


Functions

build_and_install_rockspec (rockspec_file, proj_dir)
Builds and installs local rock specified by the rockspec.

Parameters:

  • rockspec_file string Path of the rockspec file.
  • proj_dir string The base directory with the rock's sources.
change_target_lua (api_ver, luajit_ver)
Changes the target Lua version.

Parameters:

  • api_ver string The Lua API version in format x.y (e.g. 5.1).
  • luajit_ver optional string The LuaJIT version, or nil if target is not LuaJIT.
find_default_rockspec (proj_dir)
Looks for the default rockspec file in the project's directory.

Parameters:

  • proj_dir string The project's base directory.

Returns:

    string An absolute path of the found rockspec file.

Or

  1. nil
  2. string An error message.
get_variable (name)
Gets LuaRocks variable from cfg.variables table.

Parameters:

  • name
load_rockspec (rockspec_file)
Loads the specified rockspec into a table.

Parameters:

  • rockspec_file string Path of the rockspec file.

Returns:

    table A rockspec's table.

Or

  1. nil
  2. string An error message.
set_link_static (enabled)
Switches LuaRocks to use static or dynamic linking.

Parameters:

  • enabled bool true to use static linking, false to use dynamic linking.
set_variable (name, value)
Sets LuaRocks variable into cfg.variables table.

Parameters:

  • name
  • value
use_tree (dirname)

Parameters:

  • dirname string Path of the directory.

Fields

cfg
The configuration table.
is_windows
Do we run on Windows?
generated by LDoc 1.4.6