Lua: Mount a rock using the Luaroc from a locally established rock (or from .zip / .tar.gz)

I hunted, but could not determine if this is possible.

Basically, http://luarocks.org is not working, and I already have a copy of luafilesystem installed on another machine locally here. With Ruby, you can cross-set ruby ​​stones using the gem command locally. I am wondering if the same is possible with stones and Loirec.

Is there a way to β€œcross-set” a rock (eg luafilesystem) using another local installation of this rock?

Sort of:

luarocks install //10.0.1.123/machine/path/to/luafilesystem/on/other/machine

- this is what I would like to do.

UPDATE: I would even be happy with how to set a rock from .tar.gz or .zip, for example, if I downloaded one of the images from this location (in the case of LuaFileSystem).

In this case, the "source" for installation will / may be local to the machine, and not remote (and will not necessarily be installed as rock).

+6
source share
3 answers

LuaRocks has a pack subcommand that will create a binary stone (a zip file containing all the files for the installed module). You can use this binary stone to install the same module on another computer, given that the architecture is consistent.

eg.

 luarocks pack luafilesystem 

creates luafilesystem-1.6.2-2.linux-x86_64.rock on my machine and

 luarocks install luafilesystem-1.6.2-2.linux-x86_64.rock 

reinstall luafilesystem without the need for an internet connection.

+4
source

If you have the original zip code, you can unzip it and point luarocks to the rockpec file. This is how I installed "busted" from the source.

 git clone https://github.com/Olivine-Labs/busted.git luarocks install busted/busted-1.3-1.rockspec 

Or install it directly from the source

 cd busted luarocks make 
+19
source

If someone wants to install a local source.

Just do the following:

 cd /path/to/source-rock luarocks make source-rock.rockspec 

NOTE.

Use make instead of install . The reason is here (cited below).

LuaRocks offers the following:

make Compile the package in the current directory using skype.

install Install the stone.

However, install does not use true make. He tries to download and recompile the same package from the server of the one that I configured locally.

Anyway this?

The make actually build and install your customized rockspec. Poor selection of items is confusing from time to time, I know.

+3
source

Source: https://habr.com/ru/post/924473/


All Articles