mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
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
|
||||
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}";
|
||||
getLuaPath = lib : getPath lib "lua";
|
||||
getLuaCPath = lib : getPath lib "so";
|
||||
luaPath = stdenv.lib.concatStringsSep ";" (map getLuaPath libs);
|
||||
luaCPath = stdenv.lib.concatStringsSep ";" (map getLuaCPath libs);
|
||||
luaPath = concatStringsSep ";" (map getLuaPath libs);
|
||||
luaCPath = concatStringsSep ";" (map getLuaCPath libs);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -23,7 +27,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
|
||||
};
|
||||
|
||||
buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ];
|
||||
buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ]
|
||||
++ optional withLibevent luaevent;
|
||||
|
||||
configureFlags = [
|
||||
"--ostype=linux"
|
||||
@ -44,9 +49,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "Open-source XMPP application server written in Lua";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = licenses.mit;
|
||||
homepage = http://www.prosody.im;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.flosse ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.flosse ];
|
||||
};
|
||||
}
|
||||
|
@ -7967,7 +7967,8 @@ let
|
||||
prosody = recurseIntoAttrs (
|
||||
callPackage ../servers/xmpp/prosody {
|
||||
lua5 = lua5_1;
|
||||
inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop;
|
||||
inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent;
|
||||
withLibevent = true;
|
||||
});
|
||||
|
||||
elasticmq = callPackage ../servers/elasticmq { };
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
|
||||
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
|
||||
, perl, gtk, python, glib, gobjectIntrospection
|
||||
, perl, gtk, python, glib, gobjectIntrospection, libevent
|
||||
}:
|
||||
|
||||
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 {
|
||||
version = "1.3.0";
|
||||
name = "expat-${version}";
|
||||
|
Loading…
Reference in New Issue
Block a user