prosody: add dependency on zlib (close #6894)

@vcunat moved the defaults inside the prosody expression.

authored by koral and committed by Vladimír Čunát 1b4722ac 208400cb

+42 -6
+9 -3
pkgs/servers/xmpp/prosody/default.nix
··· 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; 6 7 let 8 - libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent; 9 getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}"; 10 getLuaPath = lib : getPath lib "lua"; 11 getLuaCPath = lib : getPath lib "so"; ··· 29 }; 30 31 buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ] 32 - ++ optional withLibevent luaevent; 33 34 configureFlags = [ 35 "--ostype=linux"
··· 1 + { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg 2 + , lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, luazlib ? null 3 + , withLibevent ? true, withZlib ? true }: 4 5 assert withLibevent -> luaevent != null; 6 + assert withZlib -> luazlib != null; 7 8 with stdenv.lib; 9 10 let 11 + libs = [ luasocket luasec luaexpat luafilesystem luabitop ] 12 + ++ optional withLibevent luaevent 13 + ++ optional withZlib luazlib; 14 getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}"; 15 getLuaPath = lib : getPath lib "lua"; 16 getLuaCPath = lib : getPath lib "so"; ··· 34 }; 35 36 buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ] 37 + ++ optional withLibevent luaevent 38 + ++ optional withZlib luazlib; 39 40 configureFlags = [ 41 "--ostype=linux"
+1 -2
pkgs/top-level/all-packages.nix
··· 8266 8267 prosody = callPackage ../servers/xmpp/prosody { 8268 lua5 = lua5_1; 8269 - inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent; 8270 - withLibevent = true; 8271 }; 8272 8273 elasticmq = callPackage ../servers/elasticmq { };
··· 8266 8267 prosody = callPackage ../servers/xmpp/prosody { 8268 lua5 = lua5_1; 8269 + inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luazlib; 8270 }; 8271 8272 elasticmq = callPackage ../servers/elasticmq { };
+32 -1
pkgs/top-level/lua-packages.nix
··· 7 8 { fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool 9 , pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo 10 - , perl, gtk, python, glib, gobjectIntrospection, libevent 11 }: 12 13 let ··· 204 license = stdenv.lib.licenses.mit; 205 }; 206 }; 207 208 luastdlib = buildLuaPackage { 209 name = "stdlib";
··· 7 8 { fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool 9 , pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo 10 + , perl, gtk, python, glib, gobjectIntrospection, libevent, zlib 11 }: 12 13 let ··· 204 license = stdenv.lib.licenses.mit; 205 }; 206 }; 207 + 208 + luazlib = buildLuaPackage rec { 209 + name = "zlib-${version}"; 210 + version = "0.4"; 211 + 212 + src = fetchurl { 213 + url = "https://github.com/brimworks/lua-zlib/archive/v${version}.tar.gz"; 214 + sha256 = "1l32nwyh8b4vicxvlhbv9qhkhklbhvjfn8wd72bjk7ac9kz172rd"; 215 + }; 216 + 217 + buildInputs = [ zlib ]; 218 + 219 + preBuild = '' 220 + makeFlagsArray=( 221 + linux 222 + LUAPATH="$out/share/lua/${lua.luaversion}" 223 + LUACPATH="$out/lib/lua/${lua.luaversion}" 224 + INCDIR="-I${lua}/include" 225 + LIBDIR="-L$out/lib"); 226 + ''; 227 + 228 + preInstall = "mkdir -p $out/lib/lua/${lua.luaversion}"; 229 + 230 + meta = with stdenv.lib; { 231 + homepage = https://github.com/brimworks/lua-zlib; 232 + hydraPlatforms = platforms.linux; 233 + license = licenses.mit; 234 + maintainers = [ maintainers.koral ]; 235 + }; 236 + }; 237 + 238 239 luastdlib = buildLuaPackage { 240 name = "stdlib";