diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-12-09 09:19:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 09:19:24 +0000 |
commit | 40950f6a2d081797957ac26b59655d96d26ff770 (patch) | |
tree | a56bb36931530c09a9e1b3dc82e1a1b3e960836d /pkgs/servers | |
parent | a16501cd449e6dcb232a0779715b1cf1b12ab671 (diff) | |
parent | c84cb83e40b2bac6314d46389fc0478e334c9c2c (diff) | |
download | nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar.gz nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar.bz2 nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar.lz nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar.xz nixlib-40950f6a2d081797957ac26b59655d96d26ff770.tar.zst nixlib-40950f6a2d081797957ac26b59655d96d26ff770.zip |
Merge pull request #31006 from florianjacob/prosody
Improvements for Prosody
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/xmpp/prosody/default.nix | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index 3285456a3485..b0e3492c0da1 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -1,16 +1,24 @@ { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg -, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, luazlib ? null -, withLibevent ? true, withZlib ? true }: +, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop +, withLibevent ? true, luaevent ? null +, withZlib ? true, luazlib ? null +, withDBI ? true, luadbi ? null +# use withExtraLibs to add additional dependencies of community modules +, withExtraLibs ? [ ] +, withCommunityModules ? [ ] }: assert withLibevent -> luaevent != null; assert withZlib -> luazlib != null; +assert withDBI -> luadbi != null; with stdenv.lib; let libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent - ++ optional withZlib luazlib; + ++ optional withZlib luazlib + ++ optional withDBI luadbi + ++ withExtraLibs; 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"; @@ -28,14 +36,12 @@ stdenv.mkDerivation rec { }; communityModules = fetchhg { - url = "http://prosody-modules.googlecode.com/hg/"; - rev = "4b55110b0aa8"; - sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij"; + url = "https://hg.prosody.im/prosody-modules"; + rev = "9a3e51f348fe"; + sha256 = "09g4vi52rv0r3jzcm0bsgp4ngqq6iapfbxfh0l7qj36qnajp4vm6"; }; - buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ] - ++ optional withLibevent luaevent - ++ optional withZlib luazlib; + buildInputs = [ lua5 makeWrapper libidn openssl ]; configureFlags = [ "--ostype=linux" @@ -44,7 +50,9 @@ stdenv.mkDerivation rec { ]; postInstall = '' - cp $communityModules/mod_websocket/mod_websocket.lua $out/lib/prosody/modules/ + ${concatMapStringsSep "\n" (module: '' + cp -r $communityModules/mod_${module} $out/lib/prosody/modules/ + '') withCommunityModules} wrapProgram $out/bin/prosody \ --set LUA_PATH '${luaPath};' \ --set LUA_CPATH '${luaCPath};' @@ -59,6 +67,6 @@ stdenv.mkDerivation rec { license = licenses.mit; homepage = http://www.prosody.im; platforms = platforms.linux; - maintainers = [ maintainers.flosse ]; + maintainers = [ ]; }; } |