@@ -8,6 +8,7 @@
88{ fetchurl, fetchzip, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
99, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
1010, perl, gtk2, python, glib, gobjectIntrospection, libevent, zlib, autoreconfHook
11+, libmysql, postgresql, cyrus_sasl
1112, fetchFromGitHub, libmpack, which
1213}:
1314
@@ -71,7 +72,7 @@ let
7172 description = "C extension module for Lua which adds bitwise operations on numbers";
7273 homepage = "http://bitop.luajit.org";
7374 license = licenses.mit;
74− maintainers = with maintainers; [ flosse ];
75+ maintainers = with maintainers; [ ];
7576 };
7677 };
7778
@@ -105,6 +106,35 @@ let
105106 };
106107 };
107108
109+ luacyrussasl = buildLuaPackage rec {
110+ version = "1.1.0";
111+ name = "lua-cyrussasl-${version}";
112+ src = fetchFromGitHub {
113+ owner = "JorjBauer";
114+ repo = "lua-cyrussasl";
115+ rev = "v${version}";
116+ sha256 = "14kzm3vk96k2i1m9f5zvpvq4pnzaf7s91h5g4h4x2bq1mynzw2s1";
117+ };
118+
119+ preBuild = ''
120+ makeFlagsArray=(
121+ CFLAGS="-O2 -fPIC"
122+ LDFLAGS="-O -shared -fpic -lsasl2"
123+ LUAPATH="$out/share/lua/${lua.luaversion}"
124+ CPATH="$out/lib/lua/${lua.luaversion}"
125+ );
126+ mkdir -p $out/{share,lib}/lua/${lua.luaversion}
127+ '';
128+
129+ buildInputs = [ cyrus_sasl ];
130+
131+ meta = with stdenv.lib; {
132+ homepage = "https://github.com/JorjBauer/lua-cyrussasl";
133+ description = "Cyrus SASL library for Lua 5.1+";
134+ license = licenses.bsd3;
135+ };
136+ };
137+
108138 luaevent = buildLuaPackage rec {
109139 version = "0.4.3";
110140 name = "luaevent-${version}";
@@ -140,7 +170,6 @@ let
140170 luaexpat = buildLuaPackage rec {
141171 version = "1.3.0";
142172 name = "expat-${version}";
143− isLibrary = true;
144173
145174 src = fetchurl {
146175 url = "https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz";
@@ -172,14 +201,42 @@ let
172201 };
173202 };
174203
204+ luadbi = buildLuaPackage rec {
205+ name = "luadbi-${version}";
206+ version = "0.5";
207+ src = fetchurl {
208+ url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.${version}.tar.gz";
209+ sha256 = "07ikxgxgfpimnwf7zrqwcwma83ss3wm2nzjxpwv2a1c0vmc684a9";
210+ };
211+ sourceRoot = ".";
212+
213+ buildInputs = [ libmysql postgresql sqlite ];
214+
215+ NIX_CFLAGS_COMPILE = [
216+ "-I${libmysql.dev}/include/mysql"
217+ "-I${postgresql}/include/server"
218+ ];
219+
220+ installPhase = ''
221+ mkdir -p $out/lib/lua/${lua.luaversion}
222+ install -p DBI.lua *.so $out/lib/lua/${lua.luaversion}
223+ '';
224+
225+ meta = with stdenv.lib; {
226+ homepage = "https://code.google.com/archive/p/luadbi/";
227+ platforms = stdenv.lib.platforms.unix;
228+ };
229+ };
230+
175231 luafilesystem = buildLuaPackage rec {
176− name = "filesystem-1.6.2";
232+ version = "1.6.3";
233+ name = "filesystem-${version}";
177234
178235 src = fetchFromGitHub {
179236 owner = "keplerproject";
180237 repo = "luafilesystem";
181− rev = "v1_6_2";
182− sha256 = "134azkxw84xp9g5qmzjsmcva629jm7plwcmjxkdzdg05vyd7kig1";
238+ rev = "v${stdenv.lib.replaceChars ["."] ["_"] version}";
239+ sha256 = "1hxcnqj53540ysyw8fzax7f09pl98b8f55s712gsglcdxp2g2pri";
183240 };
184241
185242 preConfigure = ''
@@ -224,12 +281,12 @@ let
224281 };
225282
226283 lpty = buildLuaPackage rec {
284+ version = "1.2.1";
227285 name = "lpty-${version}";
228− version = "1.1.1";
229286
230287 src = fetchurl {
231− url = "http://www.tset.de/downloads/lpty-1.1-1.tar.gz";
232− sha256 = "0d4ffda654dcf37dd8c99bcd100d0ee0dde7782cbd0ba9200ef8711c5cab02f1";
288+ url = "http://www.tset.de/downloads/lpty-${version}-1.tar.gz";
289+ sha256 = "0rgvbpymcgdkzdwfag607xfscs9xyqxg0dj0qr5fv906mi183gs6";
233290 };
234291
235292 preBuild = ''
@@ -331,6 +388,8 @@ let
331388 );
332389 '';
333390
391+ installTargets = [ "install" "install-unix" ];
392+
334393 meta = with stdenv.lib; {
335394 description = "Network support for Lua";
336395 homepage = "http://w3.impa.br/~diego/software/luasocket/";