lua5: Add the lua-sockets extension.

This commit is contained in:
Petr Rockai 2014-01-28 21:44:42 +01:00
parent 1f42b02624
commit 5383e07e40
3 changed files with 28 additions and 0 deletions

View File

@ -9,6 +9,7 @@ let
in
stdenv.mkDerivation rec {
name = "lua-5.1.5";
luaversion = "5.1";
src = fetchurl {
url = "http://www.lua.org/ftp/${name}.tar.gz";

View File

@ -0,0 +1,25 @@
{stdenv, fetchurl, lua5}:
stdenv.mkDerivation rec {
name = "lua-sockets-${version}";
version = "2.0.2";
src = fetchurl {
url = "http://files.luaforge.net/releases/luasocket/luasocket/luasocket-${version}/luasocket-${version}.tar.gz";
sha256 = "19ichkbc4rxv00ggz8gyf29jibvc2wq9pqjik0ll326rrxswgnag";
};
luaver = "5.1"; # TODO
patchPhase = ''
sed -e "s,^INSTALL_TOP_SHARE.*,INSTALL_TOP_SHARE=$out/share/lua/${lua5.luaversion}," \
-e "s,^INSTALL_TOP_LIB.*,INSTALL_TOP_LIB=$out/lib/lua/${lua5.luaversion}," \
-i config
'';
buildInputs = [ lua5 ];
meta = {
homepage = "http://w3.impa.br/~diego/software/luasocket/";
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.mornfall ];
};
}

View File

@ -3126,6 +3126,8 @@ let
};
lua5 = lua5_1;
lua5_sockets = callPackage ../development/interpreters/lua-5/sockets.nix {};
luarocks = callPackage ../development/tools/misc/luarocks {
lua = lua5;
};