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:
- change_target_lua (api_ver, luajit_ver)
-
Changes the target Lua version.
Parameters:
- 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
- nil
- 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
- nil
- 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.