lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hisham wrote:
On Tue, Aug 12, 2008 at 11:30 PM, Asko Kauppi <> wrote:
That's a refreshing point of view, and you might be right.

The flaw in the argument is to assume that the native packaging
systems are all functionally equivalent and that providing an
interface for them is a sufficient solution for the packaging needs of
a dynamic language. LuaRocks works in a way that rpm/deb/etc. can't:
it resolves dependency versions at require() time, and is designed to
allow multiple coexisting versions of packages transparently. Having
said that, nothing prevents from using LuaRocks as a build tool with
the end goal of producing platform-specific packages -- in fact, there
has been talk about this in the LuaRocks mailing list, and I find it
an excellent route for packagers who wish to provide native packages.
Some of the flexibility that LuaRocks provides, however, is lost, but
it may not be a problem for them, since it's a kind of flexibility
that is not present in their packaging systems to start with. On the
other hand, for those who need this flexibility, LuaRocks has proven
to be a valuable tool, so dismissing it as a bad idea or unnecessary
diversity is, in my opinion, premature judgement.

My plan, if I ever get back to it, is to use make to
build Lua and the desired libraries into a platform specific package.

But instead of having make call the compiler to build the parts of
the package, it will call LuaRocks and use its builtin module
build type to call the compiler.

Wait! Why not just use the makefile with the module? Well, all of those
modules have slightly different makefile styles, and getting them
into shape for the platform specific make is pretty ugly. The developer
would have to merge my changes into their makefile too, or else
I'll have to change it again when they upgrade the source of their

Instead, I'm using make as a kind of meta-build system, and letting
LuaRocks read the rockspec which describes how to build the module
from source.

The platform specific build switches are in a special config.lua
for each platform.

It all seems complicated, but the LuaRocks team has made a very powerful
tool that is quite easy to manipulate once you get your arms around
the concepts.

I'm really quite happy with how LuaRocks works for me.

Cheers, Ralph