git.iko.soy/typeable/nixpkgs
on master help sign in
prosody: added luaevent dependency.
commita57ec23d55547799de5aa0c78be3add65ca90d8b authorkoral <koral@mailoo.org> dateThu 19 Feb 2015, 12:09 (12 years ago) parentb9cc043
3 files changed+46−10
pkgs/servers/xmpp/prosody/default.nix+13−8 pkgs/top-level/all-packages.nix+2−1 pkgs/top-level/lua-packages.nix+31−1
pkgs/servers/xmpp/prosody/default.nix+13−8
@@ -1,12 +1,16 @@
1−{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, libidn, openssl, makeWrapper, fetchhg }:
1+{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, libidn, openssl, makeWrapper, fetchhg, withLibevent ? false }:
2+
3+assert withLibevent -> luaevent != null;
4+
5+with stdenv.lib;
26
37let
4− libs = [ luasocket luasec luaexpat luafilesystem luabitop ];
8+ libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent;
59 getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
610 getLuaPath = lib : getPath lib "lua";
711 getLuaCPath = lib : getPath lib "so";
8− luaPath = stdenv.lib.concatStringsSep ";" (map getLuaPath libs);
9− luaCPath = stdenv.lib.concatStringsSep ";" (map getLuaCPath libs);
12+ luaPath = concatStringsSep ";" (map getLuaPath libs);
13+ luaCPath = concatStringsSep ";" (map getLuaCPath libs);
1014in
1115
1216stdenv.mkDerivation rec {
@@ -23,7 +27,8 @@ stdenv.mkDerivation rec {
2327 sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
2428 };
2529
26− buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ];
30+ buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ]
31+ ++ optional withLibevent luaevent;
2732
2833 configureFlags = [
2934 "--ostype=linux"
@@ -44,9 +49,9 @@ stdenv.mkDerivation rec {
4449
4550 meta = {
4651 description = "Open-source XMPP application server written in Lua";
47− license = stdenv.lib.licenses.mit;
52+ license = licenses.mit;
4853 homepage = http://www.prosody.im;
49− platforms = stdenv.lib.platforms.linux;
50− maintainers = [ stdenv.lib.maintainers.flosse ];
54+ platforms = platforms.linux;
55+ maintainers = [ maintainers.flosse ];
5156 };
5257}
pkgs/top-level/all-packages.nix+2−1
@@ -7876,7 +7876,8 @@ let
78767876 prosody = recurseIntoAttrs (
78777877 callPackage ../servers/xmpp/prosody {
78787878 lua5 = lua5_1;
7879− inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop;
7879+ inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent;
7880+ withLibevent = true;
78807881 });
78817882
78827883 elasticmq = callPackage ../servers/elasticmq { };
pkgs/top-level/lua-packages.nix+31−1
@@ -7,7 +7,7 @@
77
88{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
99, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
10−, perl, gtk, python, glib, gobjectIntrospection
10+, perl, gtk, python, glib, gobjectIntrospection, libevent
1111}:
1212
1313let
@@ -50,6 +50,36 @@ let
5050 };
5151 };
5252
53+ luaevent = buildLuaPackage rec {
54+ version = "0.4.3";
55+ name = "luaevent-${version}";
56+ disabled = isLua52;
57+
58+ src = fetchurl {
59+ url = "https://github.com/harningt/luaevent/archive/v${version}.tar.gz";
60+ sha256 = "1ifr949j9xaas0jk0nxpilb44dqvk4c5h4m7ccksz5da3iksfgls";
61+ };
62+
63+ preBuild = ''
64+ makeFlagsArray=(
65+ INSTALL_DIR_LUA="$out/share/lua/${lua.luaversion}"
66+ INSTALL_DIR_BIN="$out/lib/lua/${lua.luaversion}"
67+ LUA_INC_DIR="${lua}/include"
68+ );
69+ '';
70+
71+ buildInputs = [ libevent ];
72+
73+ propagatedBuildInputs = [ luasocket ];
74+
75+ meta = with stdenv.lib; {
76+ homepage = http://luaforge.net/projects/luaevent/;
77+ description = "Binding of libevent to Lua.";
78+ license = licenses.mit;
79+ maintainers = [ maintainers.koral ];
80+ };
81+ };
82+
5383 luaexpat = buildLuaPackage rec {
5484 version = "1.3.0";
5585 name = "expat-${version}";