2014-09-19 21:40:37 +02: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 20:58:03 +02:00
|
|
|
{ fetchurl, fetchzip, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
|
2014-12-17 15:03:25 +01:00
|
|
|
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
|
2016-09-11 23:24:51 +02:00
|
|
|
, perl, gtk2, python, glib, gobjectIntrospection, libevent, zlib, autoreconfHook
|
2016-06-04 17:58:01 +02:00
|
|
|
, fetchFromGitHub, libmpack
|
2014-10-12 21:04:52 +02:00
|
|
|
}:
|
2014-09-19 21:40:37 +02:00
|
|
|
|
2014-09-23 13:56:29 +02:00
|
|
|
let
|
2014-10-12 21:04:52 +02:00
|
|
|
isLua51 = lua.luaversion == "5.1";
|
|
|
|
isLua52 = lua.luaversion == "5.2";
|
2017-01-27 11:49:04 +01: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 21:04:52 +02:00
|
|
|
self = _self;
|
|
|
|
_self = with self; {
|
2014-12-17 15:03:25 +01:00
|
|
|
inherit lua;
|
2014-09-19 21:40:37 +02:00
|
|
|
inherit (stdenv.lib) maintainers;
|
|
|
|
|
2016-06-12 04:11:31 +02: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 21:40:37 +02:00
|
|
|
#define build lua package function
|
2014-09-23 13:56:29 +02:00
|
|
|
buildLuaPackage = callPackage ../development/lua-modules/generic lua;
|
2014-09-19 21:40:37 +02:00
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luarocks = callPackage ../development/tools/misc/luarocks {
|
|
|
|
inherit lua;
|
|
|
|
};
|
|
|
|
|
2014-10-15 03:53:03 +02:00
|
|
|
luabitop = buildLuaPackage rec {
|
|
|
|
version = "1.0.2";
|
|
|
|
name = "bitop-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://bitop.luajit.org/download/LuaBitOp-${version}.tar.gz";
|
|
|
|
sha256 = "16fffbrgfcw40kskh2bn9q7m3gajffwd2f35rafynlnd7llwj1qj";
|
|
|
|
};
|
|
|
|
|
2015-06-10 10:04:51 +02:00
|
|
|
buildFlags = stdenv.lib.optionalString stdenv.isDarwin "macosx";
|
|
|
|
|
2015-10-22 22:46:41 +02:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile --replace 10.4 10.5
|
|
|
|
'';
|
|
|
|
|
2014-10-15 03:53:03 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2015-06-11 10:47:27 +02:00
|
|
|
${stdenv.lib.optionalString stdenv.cc.isClang "CC=$CC"}
|
2014-10-15 03:53:03 +02: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}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://bitop.luajit.org";
|
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-19 12:09:38 +01:00
|
|
|
luaevent = buildLuaPackage rec {
|
|
|
|
version = "0.4.3";
|
|
|
|
name = "luaevent-${version}";
|
|
|
|
disabled = isLua52;
|
|
|
|
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2015-02-19 12:09:38 +01:00
|
|
|
url = "https://github.com/harningt/luaevent/archive/v${version}.tar.gz";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "1c1n2zqx5rwfwkqaq1jj8gvx1vswvbihj2sy445w28icz1xfhpik";
|
2015-02-19 12:09:38 +01: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 10:54:58 +02:00
|
|
|
description = "Binding of libevent to Lua";
|
2015-02-19 12:09:38 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.koral ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
luaexpat = buildLuaPackage rec {
|
|
|
|
version = "1.3.0";
|
|
|
|
name = "expat-${version}";
|
|
|
|
isLibrary = true;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz";
|
|
|
|
sha256 = "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ expat ];
|
|
|
|
|
2017-01-31 06:05:07 +01:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
|
|
|
'';
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2016-06-09 16:36:09 +02:00
|
|
|
LUA_LDIR="$out/share/lua/${lua.luaversion}"
|
2014-09-02 17:08:56 +02:00
|
|
|
LUA_INC="-I${lua}/include" LUA_CDIR="$out/lib/lua/${lua.luaversion}"
|
2015-10-15 13:57:38 +02:00
|
|
|
EXPAT_INC="-I${expat.dev}/include");
|
2014-09-02 17:08:56 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://matthewwild.co.uk/projects/luaexpat";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-09-02 17:08:56 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.flosse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
luafilesystem = buildLuaPackage rec {
|
2014-09-19 21:40:37 +02:00
|
|
|
name = "filesystem-1.6.2";
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2014-09-19 21:40:37 +02:00
|
|
|
url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "134azkxw84xp9g5qmzjsmcva629jm7plwcmjxkdzdg05vyd7kig1";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2017-02-07 21:08:55 +01:00
|
|
|
preConfigure = "substituteInPlace config --replace 'CC= gcc' '';"
|
|
|
|
+ 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'
|
|
|
|
'';
|
2014-09-19 21:40:37 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/keplerproject/luafilesystem";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-09-19 21:40:37 +02:00
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-02-18 22:48:50 +01:00
|
|
|
luaposix = buildLuaPackage rec {
|
|
|
|
name = "posix-${version}";
|
|
|
|
version = "33.4.0";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/luaposix/luaposix/archive/release-v${version}.tar.gz";
|
|
|
|
sha256 = "e66262f5b7fe1c32c65f17a5ef5ffb31c4d1877019b4870a5d373e2ab6526a21";
|
|
|
|
};
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
meta = {
|
|
|
|
description = "Lua bindings for POSIX API";
|
|
|
|
homepage = "https://github.com/luaposix/luaposix";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-02-18 22:48:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-23 10:44:17 +01:00
|
|
|
lpty = buildLuaPackage rec {
|
|
|
|
name = "lpty-${version}";
|
|
|
|
version = "1.1.1";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.tset.de/downloads/lpty-1.1-1.tar.gz";
|
|
|
|
sha256 = "0d4ffda654dcf37dd8c99bcd100d0ee0dde7782cbd0ba9200ef8711c5cab02f1";
|
|
|
|
};
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.tset.de/lpty";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-02-23 10:44:17 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
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"
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
luasec = buildLuaPackage rec {
|
2017-01-27 11:37:55 +01:00
|
|
|
name = "sec-0.6";
|
2015-07-19 23:19:20 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brunoos";
|
|
|
|
repo = "luasec";
|
2017-01-27 11:37:55 +01:00
|
|
|
rev = "lua${name}";
|
|
|
|
sha256 = "0wv8l7f7na7kw5xn8mjik2wpxbizl7zvvp5s7fcwvz9kl5jdpk5b";
|
2014-09-02 17:08:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 11:49:04 +01:00
|
|
|
${platformString}
|
2014-09-02 17:08:56 +02:00
|
|
|
LUAPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INC_PATH="-I${lua}/include"
|
|
|
|
LIB_PATH="-L$out/lib");
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/brunoos/luasec";
|
2017-01-27 11:01:46 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-09-02 17:08:56 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.flosse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luasocket = buildLuaPackage rec {
|
|
|
|
name = "socket-${version}";
|
2015-07-19 23:20:12 +02:00
|
|
|
version = "3.0-rc1";
|
2014-09-19 21:40:37 +02:00
|
|
|
src = fetchurl {
|
2015-07-19 23:20:12 +02:00
|
|
|
url = "https://github.com/diegonehab/luasocket/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "0j8jx8bjicvp9khs26xjya8c495wrpb7parxfnabdqa5nnsxjrwb";
|
2014-09-19 21:40:37 +02:00
|
|
|
};
|
2015-07-19 23:20:12 +02:00
|
|
|
|
2016-09-17 13:10:01 +02:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/makefile --replace gcc cc \
|
2016-08-24 21:26:53 +02:00
|
|
|
--replace 10.3 10.5
|
2014-09-19 21:40:37 +02:00
|
|
|
'';
|
2015-07-19 23:20:12 +02:00
|
|
|
|
2016-09-17 13:10:01 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
LUAV=${lua.luaversion}
|
2017-01-27 11:49:04 +01:00
|
|
|
PLAT=${platformString}
|
2016-09-17 13:14:54 +02:00
|
|
|
prefix=$out
|
2016-09-17 13:10:01 +02:00
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2016-09-25 16:18:08 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-09-19 21:40:37 +02:00
|
|
|
homepage = "http://w3.impa.br/~diego/software/luasocket/";
|
2017-02-19 23:58:33 +01:00
|
|
|
platforms = with platforms; darwin ++ linux ++ freebsd ++ illumos;
|
2014-09-19 21:40:37 +02:00
|
|
|
maintainers = with maintainers; [ mornfall ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luazip = buildLuaPackage rec {
|
|
|
|
name = "zip-${version}";
|
|
|
|
version = "1.2.3";
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2014-09-23 16:01:02 +02:00
|
|
|
url = "https://github.com/luaforge/luazip/archive/0b8f5c958e170b1b49f05bc267bc0351ad4dfc44.zip";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "0zrrwhmzny5zbpx91bjbl77gzkvvdi3qhhviliggp0aj8w3faxsr";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
buildInputs = [ unzip zziplib ];
|
|
|
|
patches = [ ../development/lua-modules/zip.patch ];
|
|
|
|
# does not currently work under lua 5.2
|
|
|
|
disabled = isLua52;
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/luaforge/luazip";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-03-19 12:31:36 +01:00
|
|
|
luazlib = buildLuaPackage rec {
|
|
|
|
name = "zlib-${version}";
|
2017-01-31 21:13:24 +01:00
|
|
|
version = "1.1";
|
2015-03-19 12:31:36 +01:00
|
|
|
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2015-03-19 12:31:36 +01:00
|
|
|
url = "https://github.com/brimworks/lua-zlib/archive/v${version}.tar.gz";
|
2017-01-31 21:13:24 +01:00
|
|
|
sha256 = "1520lk4xpf094xn2zallqgqhs0zb4w61l49knv9y8pmhkdkxzzgy";
|
2015-03-19 12:31:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2017-01-31 04:00:11 +01:00
|
|
|
preConfigure = "substituteInPlace Makefile --replace gcc cc --replace '-llua' ''";
|
|
|
|
|
2015-03-19 12:31:36 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 11:49:04 +01:00
|
|
|
${platformString}
|
2015-03-19 12:31:36 +01:00
|
|
|
LUAPATH="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INCDIR="-I${lua}/include"
|
2017-01-31 04:00:11 +01:00
|
|
|
LIBDIR="-L${lua}/lib");
|
2015-03-19 12:31:36 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/lib/lua/${lua.luaversion}";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/brimworks/lua-zlib;
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = platforms.unix;
|
2015-03-19 12:31:36 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.koral ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luastdlib = buildLuaPackage {
|
|
|
|
name = "stdlib";
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2014-09-23 16:01:02 +02:00
|
|
|
url = "https://github.com/lua-stdlib/lua-stdlib/archive/release.zip";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "0636absdfjx8ybglwydmqxwfwmqz1c4b9s5mhxlgm4ci18lw3hms";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2015-05-31 18:59:38 +02:00
|
|
|
buildInputs = [ autoreconfHook unzip ];
|
2014-09-23 16:01:02 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/lua-stdlib/lua-stdlib/";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
lrexlib = buildLuaPackage rec {
|
|
|
|
name = "lrexlib-${version}";
|
|
|
|
version = "2.7.2";
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2014-09-23 16:01:02 +02:00
|
|
|
url = "https://github.com/rrthomas/lrexlib/archive/150c251be57c4e569da0f48bf6b01fbca97179fe.zip";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "0acb3258681bjq61piz331r99bdff6cnkjaigq5phg3699iz5h75";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
buildInputs = [ unzip luastdlib pcre luarocks oniguruma gnulib tre glibc ];
|
|
|
|
|
|
|
|
buildPhase = let
|
|
|
|
luaVariable = "LUA_PATH=${luastdlib}/share/lua/${lua.luaversion}/?.lua";
|
|
|
|
|
2016-04-16 19:45:26 +02:00
|
|
|
pcreVariable = "PCRE_DIR=${pcre.dev}";
|
2014-09-23 16:01:02 +02:00
|
|
|
onigVariable = "ONIG_DIR=${oniguruma}";
|
|
|
|
gnuVariable = "GNU_INCDIR=${gnulib}/lib";
|
|
|
|
treVariable = "TRE_DIR=${tre}";
|
2016-08-30 02:11:09 +02:00
|
|
|
posixVariable = "POSIX_DIR=${glibc.dev}";
|
2014-09-23 16:01:02 +02:00
|
|
|
in ''
|
|
|
|
sed -e 's@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i;@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i ${pcreVariable} ${onigVariable} ${gnuVariable} ${treVariable} ${posixVariable};@' \
|
|
|
|
-i Makefile
|
|
|
|
${luaVariable} make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out;
|
|
|
|
cp -r luarocks/lib $out;
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/lua-stdlib/lua-stdlib/";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2015-08-07 09:54:44 +02:00
|
|
|
broken = true;
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
luasqlite3 = buildLuaPackage rec {
|
|
|
|
name = "sqlite3-${version}";
|
|
|
|
version = "2.1.1";
|
2015-05-30 20:58:03 +02:00
|
|
|
src = fetchzip {
|
2014-09-23 16:01:02 +02:00
|
|
|
url = "https://github.com/LuaDist/luasql-sqlite3/archive/2acdb6cb256e63e5b5a0ddd72c4639d8c0feb52d.zip";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "17zsa0jzciildil9k4lb0rjn9s1nj80dy16pzx9bxqyi75pjf2d4";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip sqlite ];
|
|
|
|
|
|
|
|
patches = [ ../development/lua-modules/luasql.patch ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/LuaDist/luasql-sqlite3";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-11-27 21:04:28 +01:00
|
|
|
lpeg = buildLuaPackage rec {
|
|
|
|
name = "lpeg-${version}";
|
|
|
|
version = "0.12";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.inf.puc-rio.br/~roberto/lpeg/${name}.tar.gz";
|
|
|
|
sha256 = "0xlbfw1w7l65a5qhnx5sfw327hkq1zcj8xmg4glfw6fj9ha4b9gg";
|
|
|
|
};
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
2015-02-09 21:11:19 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(CC=$CC);
|
|
|
|
'';
|
|
|
|
|
2017-01-27 11:49:04 +01:00
|
|
|
buildFlags = platformString;
|
2015-02-09 21:11:19 +01:00
|
|
|
|
2014-11-27 21:04:28 +01: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}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.inf.puc-rio.br/~roberto/lpeg/";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2014-11-27 21:04:28 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
cjson = buildLuaPackage rec {
|
|
|
|
name = "cjson-${version}";
|
|
|
|
version = "2.1.0";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz";
|
|
|
|
sha256 = "0y67yqlsivbhshg8ma535llz90r4zag9xqza5jx0q7lkap6nkg2i";
|
|
|
|
};
|
|
|
|
preBuild = ''
|
|
|
|
sed -i "s|/usr/local|$out|" Makefile
|
|
|
|
'';
|
|
|
|
makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/share/lua/${lua.luaversion}/cjson/tests
|
|
|
|
'';
|
|
|
|
installTargets = "install install-extra";
|
|
|
|
meta = {
|
|
|
|
description = "Lua C extension module for JSON support";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-12-17 15:03:25 +01:00
|
|
|
lgi = stdenv.mkDerivation rec {
|
|
|
|
name = "lgi-${version}";
|
2017-01-02 13:02:19 +01:00
|
|
|
version = "0.9.1";
|
2014-12-17 15:03:25 +01:00
|
|
|
|
2017-01-02 13:02:19 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pavouk";
|
|
|
|
repo = "lgi";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "09pbapjhyc3sn0jgx747shqr9286wqfzw02h43p4pk8fv2b766b9";
|
2014-12-17 15:03:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GObject-introspection based dynamic Lua binding to GObject based libraries";
|
|
|
|
homepage = https://github.com/pavouk/lgi;
|
|
|
|
license = "custom";
|
2017-01-02 13:02:19 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 rasendubi ];
|
2014-12-17 15:03:25 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ glib gobjectIntrospection lua pkgconfig ];
|
|
|
|
|
|
|
|
makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i "s|/usr/local|$out|" lgi/Makefile
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2016-06-04 17:58:01 +02:00
|
|
|
mpack = buildLuaPackage rec {
|
|
|
|
name = "lua-mpack-${libmpack.version}";
|
|
|
|
src = libmpack.src;
|
|
|
|
sourceRoot = "libmpack-${libmpack.rev}-src/binding/lua";
|
|
|
|
buildInputs = [ libmpack ]; #libtool lua pkgconfig ];
|
|
|
|
dontBuild = true;
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
2016-06-12 04:02:33 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error -fpic";
|
2016-06-04 17:58:01 +02:00
|
|
|
installFlags = [
|
|
|
|
"USE_SYSTEM_LUA=yes"
|
|
|
|
"LUA_VERSION_MAJ_MIN="
|
|
|
|
"LUA_CMOD_INSTALLDIR=$$out/lib/lua/${lua.luaversion}"
|
|
|
|
];
|
|
|
|
meta = {
|
|
|
|
description = "Simple implementation of msgpack in C Lua 5.1";
|
|
|
|
homepage = "https://github.com/tarruda/libmpack";
|
2017-02-19 17:55:50 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-06-04 17:58:01 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-08-06 08:29:07 +02:00
|
|
|
vicious = stdenv.mkDerivation rec {
|
|
|
|
name = "vicious-${version}";
|
|
|
|
version = "2.1.3";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "http://git.sysphere.org/vicious/snapshot/vicious-${version}.tar.xz";
|
|
|
|
sha256 = "1c901siza5vpcbkgx99g1vkqiki5qgkzx2brnj4wrpbsbfzq0bcq";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Vicious widgets for window managers";
|
2015-08-06 08:29:07 +02:00
|
|
|
homepage = http://git.sysphere.org/vicious/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ makefu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2014-09-19 21:40:37 +02:00
|
|
|
}; in self
|