lua_modules_path = ".". At the end I move the
copy_directoriesback at the root of the tree to mimic a vim plugin (I am working on using luarocks to install neovim plugins). The copy fails because the installed
binfolder but https://luarocks.org/manifests/openresty/lua-cjson-18.104.22.168-1.rockspec doesn't list a bin folder ? the bin folder is listed in a
rock_manifestfile though. (using luarocks 3.7). Any idea as to why ?
copy_directoriesfolders are installed in the same folder then ? Is there a configuration entry to change that path ?
➜ ls /nix/store/87fb1fncnbnm105rbc8ndapy5qwpjxmi-lua5.2-lua-cjson-22.214.171.124-1/lua-cjson/126.96.36.199-1/ files bin/ lua-cjson-188.8.131.52-1.rockspec rock_manifest tests/
luarocks make --helpexposes a
--no-manifestoption but it doesn't used afterwards.
if args.no_manifest then cfg.no_manifest = true endbut I can't find a way to turn the flag off, it always says
Error: unknown option '--no-manifest'in
luarocks --no-manifest make ...(3.7)
v3.7.0). I set the rockspec_format to version
3.0(though this should not matter, as this appears to be the same since
1.0). My problem is now that I'm not able to set
versionto a version that uses the semantic version scheme. According to the sources of Luarock, a version scheme matching
[%w.]+-[%d]+is expected. I don't know the naming of this version scheme and I fail to find it so I could read up how this scheme works. So I started to browse the registry at
luarocks.orgto see how version strings look in practice. But I only see semantic versioning everywhere. Also if I check the rocks their sources rockspec, they just have plain semantic version strings. I thought they might just ignore the errors of
luarocks lint <rockspec_file>. But also if I run other commands like
luarocks testI get always this error that my version is not correctly formatted.
rockspec_format. But then the default is
1.0and it doesn't change anything. So is it about the the luarock version itself and this was a breaking change in a more recent version?
versionkey really means your project's version, dash, your rockspec's revision. So if you're using SemVer and your project is version 2.5.1, use
version = "2.5.1-1". The revision suffix is for when you need to make changes to the rockspec itself but not to your project.
test_dependencies. So, if you write a rockspec without a rockspec_format key you can't use some newer features, but your rockspec will work on older LuaRocks installations.
./lua_modules/bin/<binary>, else it checks the user its module tree etc. Like for example
npm exec. I'm trying to figure out how to tell my IDE which
bustedexecutable to use to run my tests. I would like to avoid custom functionality around it to check if this path exist or this or this, if luarocks knows all the trees and their order.
luarocks install --check-lua-versions lua-utf8. The installation fails due to a missing lua5.4 installation: "Error: No results matching query were found for Lua 5.4.”. But the thing is: I have Lua5.4 installed.
lua -v Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
luarocks pathcommand which outputs the environment variables needed to set the path, but no direct equivalent to
I'm trying to install
luasql-mysql but I am running into a problem.
Currently I have MariaDB installed wich I need for work so I can't change to normal MYSQL, on the github / google I did find some people that got luasql working with MariaDB but nowhere I found how they got it working.
I have luarocks 2.4.2 installed on Ubuntu 20.04 LTS and while running the command
sudo luarocks install luasql-mysql I am getting the result:
Error: Could not find header file for MYSQL
No file mysql.h in /usr/local/include
No file mysql.h in /usr/include
You may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command.
Example: luarocks install luasql-mysql MYSQL_DIR=/usr/local
Hopefully it's an easy fix since I have been trying to get lua working with MariaDB for a few hours now.
LuaCURL; LuaRocks couldn't find
curl.hin a subdirectory under
/usr/include. I'm running Ubuntu and I think I ultimately did
dpkg -L libcurl-whateverto show the location of
curl.h, and then ran
sudo luarocks install LuaCURL CURL_DIR=directory-of-curl.h-here. So it might be as simple as looking for
mysql.hin the file list for the MariaDB package or searching in
/usr, and putting in
MYSQL_DIR=whateverafter the LuaRocks command. Possibly, judging from the Ubuntu package,
sudo luarocks install luasql-mysql MYSQL_DIR=/usr/include/mariadb.