Merge pull request #6453 from k0ral/prosody
prosody: added luaevent dependency
This commit is contained in:
commit
f5ee15d694
|
@ -1,12 +1,16 @@
|
||||||
{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, libidn, openssl, makeWrapper, fetchhg }:
|
{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, libidn, openssl, makeWrapper, fetchhg, withLibevent ? false }:
|
||||||
|
|
||||||
|
assert withLibevent -> luaevent != null;
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
libs = [ luasocket luasec luaexpat luafilesystem luabitop ];
|
libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent;
|
||||||
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
||||||
getLuaPath = lib : getPath lib "lua";
|
getLuaPath = lib : getPath lib "lua";
|
||||||
getLuaCPath = lib : getPath lib "so";
|
getLuaCPath = lib : getPath lib "so";
|
||||||
luaPath = stdenv.lib.concatStringsSep ";" (map getLuaPath libs);
|
luaPath = concatStringsSep ";" (map getLuaPath libs);
|
||||||
luaCPath = stdenv.lib.concatStringsSep ";" (map getLuaCPath libs);
|
luaCPath = concatStringsSep ";" (map getLuaCPath libs);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -23,7 +27,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
|
sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ];
|
buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ]
|
||||||
|
++ optional withLibevent luaevent;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--ostype=linux"
|
"--ostype=linux"
|
||||||
|
@ -44,9 +49,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Open-source XMPP application server written in Lua";
|
description = "Open-source XMPP application server written in Lua";
|
||||||
license = stdenv.lib.licenses.mit;
|
license = licenses.mit;
|
||||||
homepage = http://www.prosody.im;
|
homepage = http://www.prosody.im;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ stdenv.lib.maintainers.flosse ];
|
maintainers = [ maintainers.flosse ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7967,7 +7967,8 @@ let
|
||||||
prosody = recurseIntoAttrs (
|
prosody = recurseIntoAttrs (
|
||||||
callPackage ../servers/xmpp/prosody {
|
callPackage ../servers/xmpp/prosody {
|
||||||
lua5 = lua5_1;
|
lua5 = lua5_1;
|
||||||
inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop;
|
inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent;
|
||||||
|
withLibevent = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
elasticmq = callPackage ../servers/elasticmq { };
|
elasticmq = callPackage ../servers/elasticmq { };
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
|
{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
|
||||||
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
|
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
|
||||||
, perl, gtk, python, glib, gobjectIntrospection
|
, perl, gtk, python, glib, gobjectIntrospection, libevent
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -50,6 +50,36 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
luaevent = buildLuaPackage rec {
|
||||||
|
version = "0.4.3";
|
||||||
|
name = "luaevent-${version}";
|
||||||
|
disabled = isLua52;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/harningt/luaevent/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "1ifr949j9xaas0jk0nxpilb44dqvk4c5h4m7ccksz5da3iksfgls";
|
||||||
|
};
|
||||||
|
|
||||||
|
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/;
|
||||||
|
description = "Binding of libevent to Lua.";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.koral ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
luaexpat = buildLuaPackage rec {
|
luaexpat = buildLuaPackage rec {
|
||||||
version = "1.3.0";
|
version = "1.3.0";
|
||||||
name = "expat-${version}";
|
name = "expat-${version}";
|
||||||
|
|
Loading…
Reference in New Issue