2014-09-19 19:40:37 +00:00
|
|
|
/* This file defines the composition for Lua packages. It has
|
|
|
|
been factored out of all-packages.nix because there are many of
|
|
|
|
them. Also, because most Nix expressions for Lua packages are
|
|
|
|
trivial, most are actually defined here. I.e. there's no function
|
|
|
|
for each package in a separate file: the call to the function would
|
|
|
|
be almost as must code as the function itself. */
|
|
|
|
|
2015-05-30 18:58:03 +00:00
|
|
|
{ fetchurl, fetchzip, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
|
2014-12-17 14:03:25 +00:00
|
|
|
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
|
2016-09-11 21:24:51 +00:00
|
|
|
, perl, gtk2, python, glib, gobjectIntrospection, libevent, zlib, autoreconfHook
|
2017-09-24 14:02:02 +00:00
|
|
|
, fetchFromGitHub, libmpack, which
|
2014-10-12 19:04:52 +00:00
|
|
|
}:
|
2014-09-19 19:40:37 +00:00
|
|
|
|
2014-09-23 11:56:29 +00:00
|
|
|
let
|
2014-10-12 19:04:52 +00:00
|
|
|
isLua51 = lua.luaversion == "5.1";
|
|
|
|
isLua52 = lua.luaversion == "5.2";
|
2017-10-09 12:21:48 +00:00
|
|
|
isLuaJIT = (builtins.parseDrvName lua.name).name == "luajit";
|
2017-01-27 10:49:04 +00:00
|
|
|
|
|
|
|
platformString =
|
|
|
|
if stdenv.isDarwin then "macosx"
|
|
|
|
else if stdenv.isFreeBSD then "freebsd"
|
|
|
|
else if stdenv.isLinux then "linux"
|
|
|
|
else if stdenv.isSunOS then "solaris"
|
|
|
|
else throw "unsupported platform";
|
|
|
|
|
2014-10-12 19:04:52 +00:00
|
|
|
self = _self;
|
|
|
|
_self = with self; {
|
2014-12-17 14:03:25 +00:00
|
|
|
inherit lua;
|
2014-09-19 19:40:37 +00:00
|
|
|
inherit (stdenv.lib) maintainers;
|
|
|
|
|
2016-06-12 02:11:31 +00:00
|
|
|
# helper functions for dealing with LUA_PATH and LUA_CPATH
|
|
|
|
getPath = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}";
|
|
|
|
getLuaPath = lib : getPath lib "lua";
|
|
|
|
getLuaCPath = lib : getPath lib "so";
|
|
|
|
|
2014-09-19 19:40:37 +00:00
|
|
|
#define build lua package function
|
2014-09-23 11:56:29 +00:00
|
|
|
buildLuaPackage = callPackage ../development/lua-modules/generic lua;
|
2014-09-19 19:40:37 +00:00
|
|
|
|
2014-09-23 14:01:02 +00:00
|
|
|
luarocks = callPackage ../development/tools/misc/luarocks {
|
|
|
|
inherit lua;
|
|
|
|
};
|
|
|
|
|
2014-10-15 01:53:03 +00:00
|
|
|
luabitop = buildLuaPackage rec {
|
|
|
|
version = "1.0.2";
|
|
|
|
name = "bitop-${version}";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2014-10-15 01:53:03 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://bitop.luajit.org/download/LuaBitOp-${version}.tar.gz";
|
|
|
|
sha256 = "16fffbrgfcw40kskh2bn9q7m3gajffwd2f35rafynlnd7llwj1qj";
|
|
|
|
};
|
|
|
|
|
2015-06-10 08:04:51 +00:00
|
|
|
buildFlags = stdenv.lib.optionalString stdenv.isDarwin "macosx";
|
|
|
|
|
2015-10-22 20:46:41 +00:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile --replace 10.4 10.5
|
|
|
|
'';
|
|
|
|
|
2014-10-15 01:53:03 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2015-06-11 08:47:27 +00:00
|
|
|
${stdenv.lib.optionalString stdenv.cc.isClang "CC=$CC"}
|
2014-10-15 01:53:03 +00:00
|
|
|
INCLUDES="-I${lua}/include"
|
|
|
|
LUA="${lua}/bin/lua");
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p bit.so $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "C extension module for Lua which adds bitwise operations on numbers";
|
2014-10-15 01:53:03 +00:00
|
|
|
homepage = "http://bitop.luajit.org";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
2014-10-15 01:53:03 +00:00
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-08-24 10:10:56 +00:00
|
|
|
luacheck = buildLuaPackage rec {
|
|
|
|
pname = "luacheck";
|
|
|
|
version = "0.20.0";
|
2017-10-13 03:48:17 +00:00
|
|
|
name = "${pname}-${version}";
|
2017-08-24 10:10:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpeterv";
|
|
|
|
repo = "luacheck";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "0ahfkmqcjhlb7r99bswy1sly6d7p4pyw5f4x4fxnxzjhbq0c5qcs";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ lua ];
|
|
|
|
|
2017-10-09 12:29:56 +00:00
|
|
|
# No Makefile.
|
|
|
|
dontBuild = true;
|
|
|
|
|
2017-08-24 10:10:56 +00:00
|
|
|
installPhase = ''
|
|
|
|
${lua}/bin/lua install.lua $out
|
2017-10-13 03:48:17 +00:00
|
|
|
'';
|
2017-08-24 10:10:56 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A tool for linting and static analysis of Lua code";
|
|
|
|
homepage = https://github.com/mpeterv/luacheck;
|
|
|
|
license = licenses.mit;
|
2017-10-13 03:48:17 +00:00
|
|
|
maintainers = with maintainers; [ vyp ];
|
2017-08-24 10:10:56 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-19 11:09:38 +00:00
|
|
|
luaevent = buildLuaPackage rec {
|
|
|
|
version = "0.4.3";
|
|
|
|
name = "luaevent-${version}";
|
|
|
|
disabled = isLua52;
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "harningt";
|
|
|
|
repo = "luaevent";
|
|
|
|
rev = "v${version}";
|
2015-05-30 18:58:03 +00:00
|
|
|
sha256 = "1c1n2zqx5rwfwkqaq1jj8gvx1vswvbihj2sy445w28icz1xfhpik";
|
2015-02-19 11:09:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
INSTALL_DIR_LUA="$out/share/lua/${lua.luaversion}"
|
|
|
|
INSTALL_DIR_BIN="$out/lib/lua/${lua.luaversion}"
|
|
|
|
LUA_INC_DIR="${lua}/include"
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ libevent ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ luasocket ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://luaforge.net/projects/luaevent/;
|
2015-04-28 08:54:58 +00:00
|
|
|
description = "Binding of libevent to Lua";
|
2015-02-19 11:09:38 +00:00
|
|
|
license = licenses.mit;
|
2017-10-13 03:48:17 +00:00
|
|
|
maintainers = with maintainers; [ koral ];
|
2015-02-19 11:09:38 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 15:08:56 +00:00
|
|
|
luaexpat = buildLuaPackage rec {
|
|
|
|
version = "1.3.0";
|
|
|
|
name = "expat-${version}";
|
|
|
|
isLibrary = true;
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2014-09-02 15:08:56 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz";
|
|
|
|
sha256 = "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ expat ];
|
|
|
|
|
2017-01-31 05:05:07 +00:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
|
|
|
'';
|
|
|
|
|
2014-09-02 15:08:56 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2016-06-09 14:36:09 +00:00
|
|
|
LUA_LDIR="$out/share/lua/${lua.luaversion}"
|
2014-09-02 15:08:56 +00:00
|
|
|
LUA_INC="-I${lua}/include" LUA_CDIR="$out/lib/lua/${lua.luaversion}"
|
2015-10-15 11:57:38 +00:00
|
|
|
EXPAT_INC="-I${expat.dev}/include");
|
2014-09-02 15:08:56 +00:00
|
|
|
'';
|
|
|
|
|
2017-10-09 12:27:42 +00:00
|
|
|
disabled = isLuaJIT;
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SAX XML parser based on the Expat library";
|
2014-09-02 15:08:56 +00:00
|
|
|
homepage = "http://matthewwild.co.uk/projects/luaexpat";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
platforms = platforms.unix;
|
2014-09-02 15:08:56 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
luafilesystem = buildLuaPackage rec {
|
2014-09-19 19:40:37 +00:00
|
|
|
name = "filesystem-1.6.2";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keplerproject";
|
|
|
|
repo = "luafilesystem";
|
|
|
|
rev = "v1_6_2";
|
2015-05-30 18:58:03 +00:00
|
|
|
sha256 = "134azkxw84xp9g5qmzjsmcva629jm7plwcmjxkdzdg05vyd7kig1";
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
2017-10-13 03:46:51 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace config --replace "CC= gcc" "";
|
|
|
|
''
|
2017-02-07 20:08:55 +00:00
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace config \
|
|
|
|
--replace 'LIB_OPTION= -shared' '###' \
|
|
|
|
--replace '#LIB_OPTION= -bundle' 'LIB_OPTION= -bundle'
|
|
|
|
substituteInPlace Makefile --replace '10.3' '10.5'
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua library complementing filesystem-related functions";
|
2014-09-19 19:40:37 +00:00
|
|
|
homepage = "https://github.com/keplerproject/luafilesystem";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
2014-09-19 19:40:37 +00:00
|
|
|
maintainers = with maintainers; [ flosse ];
|
2017-10-13 03:48:17 +00:00
|
|
|
platforms = platforms.unix;
|
2014-09-19 19:40:37 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-02-18 21:48:50 +00:00
|
|
|
luaposix = buildLuaPackage rec {
|
|
|
|
name = "posix-${version}";
|
|
|
|
version = "33.4.0";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luaposix";
|
|
|
|
repo = "luaposix";
|
|
|
|
rev = "release-v${version}";
|
|
|
|
sha256 = "0y531p54lx2yf243bcsyp6sv8fvbqidp20yry0xvb85p8zw9dlrq";
|
2017-02-18 21:48:50 +00:00
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-02-18 21:48:50 +00:00
|
|
|
buildInputs = [ perl ];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-02-18 21:48:50 +00:00
|
|
|
description = "Lua bindings for POSIX API";
|
|
|
|
homepage = "https://github.com/luaposix/luaposix";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.unix;
|
2017-02-18 21:48:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-23 09:44:17 +00:00
|
|
|
lpty = buildLuaPackage rec {
|
|
|
|
name = "lpty-${version}";
|
|
|
|
version = "1.1.1";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-23 09:44:17 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.tset.de/downloads/lpty-1.1-1.tar.gz";
|
|
|
|
sha256 = "0d4ffda654dcf37dd8c99bcd100d0ee0dde7782cbd0ba9200ef8711c5cab02f1";
|
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-23 09:44:17 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
INST_LIBDIR="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INST_LUADIR="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUA_BINDIR="${lua}/bin"
|
|
|
|
LUA_INCDIR="-I${lua}/include"
|
|
|
|
LUA_LIBDIR="-L${lua}/lib"
|
|
|
|
);
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "PTY control for Lua";
|
|
|
|
homepage = "http://www.tset.de/lpty";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2015-02-23 09:44:17 +00:00
|
|
|
};
|
|
|
|
|
2017-09-30 10:52:25 +00:00
|
|
|
lua-iconv = buildLuaPackage rec {
|
|
|
|
name = "lua-iconv-${version}";
|
|
|
|
version = "7";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-30 10:52:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ittner";
|
|
|
|
repo = "lua-iconv";
|
2017-10-13 03:48:17 +00:00
|
|
|
rev = name;
|
2017-09-30 10:52:25 +00:00
|
|
|
sha256 = "0rd76966qlxfp8ypkyrbif76nxnm1acclqwfs45wz3972jsk654i";
|
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
INSTALL_PATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-09-30 10:52:25 +00:00
|
|
|
description = "Lua bindings for POSIX iconv";
|
|
|
|
homepage = "https://ittner.github.io/lua-iconv/";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ richardipsum ];
|
|
|
|
platforms = platforms.unix;
|
2017-09-30 10:52:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 15:08:56 +00:00
|
|
|
luasec = buildLuaPackage rec {
|
2017-01-27 10:37:55 +00:00
|
|
|
name = "sec-0.6";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-07-19 21:19:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brunoos";
|
|
|
|
repo = "luasec";
|
2017-01-27 10:37:55 +00:00
|
|
|
rev = "lua${name}";
|
|
|
|
sha256 = "0wv8l7f7na7kw5xn8mjik2wpxbizl7zvvp5s7fcwvz9kl5jdpk5b";
|
2014-09-02 15:08:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 10:49:04 +00:00
|
|
|
${platformString}
|
2014-09-02 15:08:56 +00:00
|
|
|
LUAPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INC_PATH="-I${lua}/include"
|
|
|
|
LIB_PATH="-L$out/lib");
|
|
|
|
'';
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua binding for OpenSSL library to provide TLS/SSL communication";
|
2014-09-02 15:08:56 +00:00
|
|
|
homepage = "https://github.com/brunoos/luasec";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
platforms = platforms.unix;
|
2014-09-02 15:08:56 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-23 14:01:02 +00:00
|
|
|
luasocket = buildLuaPackage rec {
|
|
|
|
name = "socket-${version}";
|
2015-07-19 21:20:12 +00:00
|
|
|
version = "3.0-rc1";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "diegonehab";
|
|
|
|
repo = "luasocket";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1chs7z7a3i3lck4x7rz60ziwbf793gw169hpjdfca8y4yf1hzsxk";
|
2014-09-19 19:40:37 +00:00
|
|
|
};
|
2015-07-19 21:20:12 +00:00
|
|
|
|
2016-09-17 11:10:01 +00:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/makefile --replace gcc cc \
|
2016-08-24 19:26:53 +00:00
|
|
|
--replace 10.3 10.5
|
2014-09-19 19:40:37 +00:00
|
|
|
'';
|
2015-07-19 21:20:12 +00:00
|
|
|
|
2016-09-17 11:10:01 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
LUAV=${lua.luaversion}
|
2017-01-27 10:49:04 +00:00
|
|
|
PLAT=${platformString}
|
2016-09-17 11:14:54 +00:00
|
|
|
prefix=$out
|
2016-09-17 11:10:01 +00:00
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2016-09-25 14:18:08 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-13 03:48:17 +00:00
|
|
|
description = "Network support for Lua";
|
2014-09-19 19:40:37 +00:00
|
|
|
homepage = "http://w3.impa.br/~diego/software/luasocket/";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
2014-09-19 19:40:37 +00:00
|
|
|
maintainers = with maintainers; [ mornfall ];
|
2017-10-13 03:48:17 +00:00
|
|
|
platforms = with platforms; darwin ++ linux ++ freebsd ++ illumos;
|
2014-09-19 19:40:37 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-09-24 14:02:02 +00:00
|
|
|
luxio = buildLuaPackage rec {
|
|
|
|
name = "luxio-${version}";
|
|
|
|
version = "13";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-24 14:02:02 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://git.gitano.org.uk/luxio.git/snapshot/luxio-luxio-13.tar.bz2";
|
|
|
|
sha256 = "1hvwslc25q7k82rxk461zr1a2041nxg7sn3sw3w0y5jxf0giz2pz";
|
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-24 14:44:43 +00:00
|
|
|
nativeBuildInputs = [ which pkgconfig ];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-24 14:44:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-24 14:02:02 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
INST_LIBDIR="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INST_LUADIR="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUA_BINDIR="$out/bin"
|
2017-09-24 14:44:43 +00:00
|
|
|
INSTALL=install
|
2017-09-24 14:02:02 +00:00
|
|
|
);
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lightweight UNIX I/O and POSIX binding for Lua";
|
|
|
|
homepage = "https://www.gitano.org.uk/luxio/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ richardipsum ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2017-09-24 14:02:02 +00:00
|
|
|
};
|
|
|
|
|
2014-09-23 14:01:02 +00:00
|
|
|
luazip = buildLuaPackage rec {
|
|
|
|
name = "zip-${version}";
|
2017-10-13 03:48:17 +00:00
|
|
|
version = "2007-10-30";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luaforge";
|
|
|
|
repo = "luazip";
|
|
|
|
rev = "0b8f5c958e170b1b49f05bc267bc0351ad4dfc44";
|
2015-05-30 18:58:03 +00:00
|
|
|
sha256 = "0zrrwhmzny5zbpx91bjbl77gzkvvdi3qhhviliggp0aj8w3faxsr";
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
buildInputs = [ zziplib ];
|
|
|
|
|
2014-09-23 14:01:02 +00:00
|
|
|
patches = [ ../development/lua-modules/zip.patch ];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
# Does not currently work under Lua 5.2 or LuaJIT.
|
2017-10-09 12:27:42 +00:00
|
|
|
disabled = isLua52 || isLuaJIT;
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua library to read files stored inside zip files";
|
2014-09-23 14:01:02 +00:00
|
|
|
homepage = "https://github.com/luaforge/luazip";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-03-19 11:31:36 +00:00
|
|
|
luazlib = buildLuaPackage rec {
|
|
|
|
name = "zlib-${version}";
|
2017-01-31 20:13:24 +00:00
|
|
|
version = "1.1";
|
2015-03-19 11:31:36 +00:00
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brimworks";
|
|
|
|
repo = "lua-zlib";
|
|
|
|
rev = "v${version}";
|
2017-01-31 20:13:24 +00:00
|
|
|
sha256 = "1520lk4xpf094xn2zallqgqhs0zb4w61l49knv9y8pmhkdkxzzgy";
|
2015-03-19 11:31:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2017-10-13 03:46:51 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace gcc cc --replace "-llua" ""
|
|
|
|
'';
|
2017-01-31 03:00:11 +00:00
|
|
|
|
2015-03-19 11:31:36 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 10:49:04 +00:00
|
|
|
${platformString}
|
2015-03-19 11:31:36 +00:00
|
|
|
LUAPATH="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INCDIR="-I${lua}/include"
|
2017-01-31 03:00:11 +00:00
|
|
|
LIBDIR="-L${lua}/lib");
|
2015-03-19 11:31:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/lib/lua/${lua.luaversion}";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-10-13 03:48:17 +00:00
|
|
|
description = "Simple streaming interface to zlib for Lua";
|
2015-03-19 11:31:36 +00:00
|
|
|
homepage = https://github.com/brimworks/lua-zlib;
|
|
|
|
license = licenses.mit;
|
2017-10-13 03:48:17 +00:00
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
platforms = platforms.unix;
|
2015-03-19 11:31:36 +00:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 18:06:37 +00:00
|
|
|
|
2015-03-19 11:31:36 +00:00
|
|
|
|
2014-09-23 14:01:02 +00:00
|
|
|
luastdlib = buildLuaPackage {
|
|
|
|
name = "stdlib";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-05-30 18:58:03 +00:00
|
|
|
src = fetchzip {
|
2014-09-23 14:01:02 +00:00
|
|
|
url = "https://github.com/lua-stdlib/lua-stdlib/archive/release.zip";
|
2015-05-30 18:58:03 +00:00
|
|
|
sha256 = "0636absdfjx8ybglwydmqxwfwmqz1c4b9s5mhxlgm4ci18lw3hms";
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-09-19 02:27:05 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook unzip ];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "General Lua libraries";
|
|
|
|
homepage = "https://github.com/lua-stdlib/lua-stdlib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
lrexlib = buildLuaPackage rec {
|
|
|
|
name = "lrexlib-${version}";
|
2017-07-08 18:42:16 +00:00
|
|
|
version = "2.8.0";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rrthomas";
|
|
|
|
repo = "lrexlib";
|
|
|
|
rev = "rel-2-8-0";
|
2017-07-08 18:42:16 +00:00
|
|
|
sha256 = "1c62ny41b1ih6iddw5qn81gr6dqwfffzdp7q6m8x09zzcdz78zhr";
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
buildInputs = [ luastdlib pcre luarocks oniguruma gnulib tre glibc ];
|
2014-09-23 14:01:02 +00:00
|
|
|
|
|
|
|
buildPhase = let
|
2017-07-08 18:42:16 +00:00
|
|
|
luaVariable = ''LUA_PATH="${luastdlib}/share/lua/${lua.luaversion}/?/init.lua;${luastdlib}/share/lua/${lua.luaversion}/?.lua"'';
|
|
|
|
pcreVariable = "PCRE_DIR=${pcre.out} PCRE_INCDIR=${pcre.dev}/include";
|
2014-09-23 14:01:02 +00:00
|
|
|
onigVariable = "ONIG_DIR=${oniguruma}";
|
|
|
|
gnuVariable = "GNU_INCDIR=${gnulib}/lib";
|
|
|
|
treVariable = "TRE_DIR=${tre}";
|
2016-08-30 00:11:09 +00:00
|
|
|
posixVariable = "POSIX_DIR=${glibc.dev}";
|
2014-09-23 14:01:02 +00:00
|
|
|
in ''
|
2017-07-08 18:42:16 +00:00
|
|
|
sed -e 's@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i;@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i ${pcreVariable} ${onigVariable} ${gnuVariable} ${treVariable} ${posixVariable};@' -i Makefile
|
2014-09-23 14:01:02 +00:00
|
|
|
${luaVariable} make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out;
|
|
|
|
cp -r luarocks/lib $out;
|
|
|
|
'';
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua bindings of various regex library APIs";
|
|
|
|
homepage = "https://github.com/rrthomas/lrexlib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
luasqlite3 = buildLuaPackage rec {
|
|
|
|
name = "sqlite3-${version}";
|
2017-10-13 03:48:17 +00:00
|
|
|
version = "2.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LuaDist";
|
|
|
|
repo = "luasql-sqlite3";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "05k8zs8nsdmlwja3hdhckwknf7ww5cvbp3sxhk2xd1i3ij6aa10b";
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
buildInputs = [ sqlite ];
|
2014-09-23 14:01:02 +00:00
|
|
|
|
|
|
|
patches = [ ../development/lua-modules/luasql.patch ];
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Database connectivity for Lua";
|
2014-09-23 14:01:02 +00:00
|
|
|
homepage = "https://github.com/LuaDist/luasql-sqlite3";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 14:01:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-11-27 20:04:28 +00:00
|
|
|
lpeg = buildLuaPackage rec {
|
|
|
|
name = "lpeg-${version}";
|
|
|
|
version = "0.12";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2014-11-27 20:04:28 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.inf.puc-rio.br/~roberto/lpeg/${name}.tar.gz";
|
|
|
|
sha256 = "0xlbfw1w7l65a5qhnx5sfw327hkq1zcj8xmg4glfw6fj9ha4b9gg";
|
|
|
|
};
|
|
|
|
|
2015-02-09 20:11:19 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(CC=$CC);
|
|
|
|
'';
|
|
|
|
|
2017-01-27 10:49:04 +00:00
|
|
|
buildFlags = platformString;
|
2015-02-09 20:11:19 +00:00
|
|
|
|
2014-11-27 20:04:28 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p lpeg.so $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p re.lua $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Parsing Expression Grammars For Lua";
|
2014-11-27 20:04:28 +00:00
|
|
|
homepage = "http://www.inf.puc-rio.br/~roberto/lpeg/";
|
2017-10-13 03:48:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.all;
|
2014-11-27 20:04:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
cjson = buildLuaPackage rec {
|
|
|
|
name = "cjson-${version}";
|
|
|
|
version = "2.1.0";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
src = fetchurl {
|
2017-10-13 03:48:17 +00:00
|
|
|
url = "http://www.kyne.com.au/~mark/software/download/lua-${name}.tar.gz";
|
2015-02-18 00:12:43 +00:00
|
|
|
sha256 = "0y67yqlsivbhshg8ma535llz90r4zag9xqza5jx0q7lkap6nkg2i";
|
|
|
|
};
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
preBuild = ''
|
|
|
|
sed -i "s|/usr/local|$out|" Makefile
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/share/lua/${lua.luaversion}/cjson/tests
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2015-02-18 00:12:43 +00:00
|
|
|
installTargets = "install install-extra";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-10-09 12:27:42 +00:00
|
|
|
disabled = isLuaJIT;
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-02-18 00:12:43 +00:00
|
|
|
description = "Lua C extension module for JSON support";
|
2017-10-13 03:48:17 +00:00
|
|
|
homepage = "https://www.kyne.com.au/~mark/software/lua-cjson.php";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
2015-02-18 00:12:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-12-17 14:03:25 +00:00
|
|
|
lgi = stdenv.mkDerivation rec {
|
|
|
|
name = "lgi-${version}";
|
2017-01-02 12:02:19 +00:00
|
|
|
version = "0.9.1";
|
2014-12-17 14:03:25 +00:00
|
|
|
|
2017-01-02 12:02:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pavouk";
|
|
|
|
repo = "lgi";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "09pbapjhyc3sn0jgx747shqr9286wqfzw02h43p4pk8fv2b766b9";
|
2014-12-17 14:03:25 +00:00
|
|
|
};
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [ glib gobjectIntrospection lua ];
|
2014-12-17 14:03:25 +00:00
|
|
|
|
|
|
|
makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i "s|/usr/local|$out|" lgi/Makefile
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GObject-introspection based dynamic Lua binding to GObject based libraries";
|
|
|
|
homepage = https://github.com/pavouk/lgi;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lovek323 rasendubi ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2014-12-17 14:03:25 +00:00
|
|
|
};
|
|
|
|
|
2016-06-04 15:58:01 +00:00
|
|
|
mpack = buildLuaPackage rec {
|
|
|
|
name = "lua-mpack-${libmpack.version}";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
# NOTE: For updating, new Lua mpack bindings live at:
|
|
|
|
# https://github.com/libmpack/libmpack-lua.
|
2016-06-04 15:58:01 +00:00
|
|
|
src = libmpack.src;
|
|
|
|
sourceRoot = "libmpack-${libmpack.rev}-src/binding/lua";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libmpack ]; # ++ [ libtool lua ];
|
2016-06-04 15:58:01 +00:00
|
|
|
dontBuild = true;
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2016-06-04 15:58:01 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2016-06-12 02:02:33 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error -fpic";
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2016-06-04 15:58:01 +00:00
|
|
|
installFlags = [
|
|
|
|
"USE_SYSTEM_LUA=yes"
|
|
|
|
"LUA_VERSION_MAJ_MIN="
|
|
|
|
"LUA_CMOD_INSTALLDIR=$$out/lib/lua/${lua.luaversion}"
|
|
|
|
];
|
2017-10-13 03:48:17 +00:00
|
|
|
|
2017-10-09 12:21:48 +00:00
|
|
|
# gcc -llua fails with luajit.
|
|
|
|
disabled = isLuaJIT;
|
2017-10-13 03:48:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua bindings for libmpack";
|
|
|
|
homepage = "https://github.com/libmpack/libmpack-lua";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-06-04 15:58:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-08-06 06:29:07 +00:00
|
|
|
vicious = stdenv.mkDerivation rec {
|
|
|
|
name = "vicious-${version}";
|
2017-03-30 18:06:37 +00:00
|
|
|
version = "2.2.0";
|
2015-08-06 06:29:07 +00:00
|
|
|
|
2017-03-30 18:06:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "vicious";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0dhy0vklrhqrnmxb9pyqbfvkwwy86lwysk93pzg1j1zwprx366fj";
|
2015-08-06 06:29:07 +00:00
|
|
|
};
|
|
|
|
|
2017-10-13 03:48:17 +00:00
|
|
|
buildInputs = [ lua ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}/
|
|
|
|
cp -r . $out/lib/lua/${lua.luaversion}/vicious/
|
|
|
|
printf "package.path = '$out/lib/lua/${lua.luaversion}/?/init.lua;' .. package.path\nreturn require((...) .. '.init')\n" > $out/lib/lua/${lua.luaversion}/vicious.lua
|
|
|
|
'';
|
|
|
|
|
2015-08-06 06:29:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "Vicious widgets for window managers";
|
2017-03-30 18:06:37 +00:00
|
|
|
homepage = https://github.com/Mic92/vicious;
|
2015-08-06 06:29:07 +00:00
|
|
|
license = licenses.gpl2;
|
2017-03-30 18:06:37 +00:00
|
|
|
maintainers = with maintainers; [ makefu mic92 ];
|
2015-08-06 06:29:07 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-19 19:40:37 +00:00
|
|
|
}; in self
|