On Thu, Jan 5, 2012 at 5:41 AM, Hisham <[email protected]> wrote:
> I've always meant for build backends to be extensible in LR, but we've
> never explored that much. We probably need some more mechanisms to
> make that effective (for example, if the value of build.type is "foo"
> and there's no luarocks.build.foo module, try to install a
> "luarocks-build-foo" rock).

My experiment was more straightforward - simply deploy
luarocks.build.lake using LuaRocks ;) And that's the point that seemed
a little ... dodgy.

> Do you see Lake as an eventual replacement
> for the LuaRocks "builtin" build type?

The builtin type is actually very powerful, and in fact people don't
always realize how powerful it is. As a _notation_, complicated
builtin builds suck however, once you have all these per-platform
overrides. I've played with a little library that generates builtin
rockspecs from a Lua script. For example, this is a script that
generates a working LuaSocket rockspec:

--------
require 'rockspec'

package('luasocket','2.0.2','3')

C.module.socket.core [[
 luasocket.c auxiliar.c buffer.c except.c io.c tcp.c
 timeout.c udp.c options.c select.c inet.c
]]
:defines 'LUASOCKET_DEBUG'
:when 'unix' :add 'usocket.c'
:when 'win32'
  :add 'wsocket.c'
  :libraries 'wsock32'

C.module.mime.core 'mime.c'

Lua.directory 'src'

function socket(name)
  Lua.module.socket[name] (name..'.lua')
end

socket 'http'
socket 'url'
socket 'tp'
socket 'ftp'
socket 'smtp'

Lua.module.ltn12()
Lua.module.socket()
Lua.module.mime()

rockspec.write()
--------------

However, something like Lake can do more arbitrary things, that's
true.  And if it was possible for a rockspec to specify its required
build backend as a dependency, then that gives a rockspec author extra
freedom.

steve d.

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to