diff options
-rw-r--r-- | customized/prosody.nix | 6 | ||||
-rw-r--r-- | ymir.nix | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/customized/prosody.nix b/customized/prosody.nix index d8afe5b9..87f88f4b 100644 --- a/customized/prosody.nix +++ b/customized/prosody.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg | 1 | { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg |
2 | , lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, luazlib ? null | 2 | , lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, luazlib ? null |
3 | , withLibevent ? true, withZlib ? true | 3 | , withLibevent ? true, withZlib ? true |
4 | , communityModules ? [], extraLibs ? [], extraModules ? [] | 4 | , withCommunityModules ? [], extraLibs ? [], extraModules ? [] |
5 | }: | 5 | }: |
6 | 6 | ||
7 | assert withLibevent -> luaevent != null; | 7 | assert withLibevent -> luaevent != null; |
@@ -21,7 +21,7 @@ let | |||
21 | copyExtraModule = path: "n=0; for i in ${path}/*; do n=1; done; if [[ $n -gt 0 ]]; then cp -rv ${path}/* $out/lib/prosody/modules/; fi"; | 21 | copyExtraModule = path: "n=0; for i in ${path}/*; do n=1; done; if [[ $n -gt 0 ]]; then cp -rv ${path}/* $out/lib/prosody/modules/; fi"; |
22 | luaPath = concatStringsSep ";" (map getLuaPath libs); | 22 | luaPath = concatStringsSep ";" (map getLuaPath libs); |
23 | luaCPath = concatStringsSep ";" (map getLuaCPath libs); | 23 | luaCPath = concatStringsSep ";" (map getLuaCPath libs); |
24 | copyModules = concatStringsSep ";" (map copyModule communityModules); | 24 | copyModules = concatStringsSep ";" (map copyModule withCommunityModules); |
25 | copyExtraModules = concatStringsSep ";" (map copyExtraModule extraModules); | 25 | copyExtraModules = concatStringsSep ";" (map copyExtraModule extraModules); |
26 | in | 26 | in |
27 | 27 | ||
@@ -62,6 +62,8 @@ stdenv.mkDerivation rec { | |||
62 | --set LUA_CPATH '${luaCPath};' | 62 | --set LUA_CPATH '${luaCPath};' |
63 | ''; | 63 | ''; |
64 | 64 | ||
65 | passthru.communityModules = withCommunityModules; | ||
66 | |||
65 | meta = { | 67 | meta = { |
66 | description = "Open-source XMPP application server written in Lua"; | 68 | description = "Open-source XMPP application server written in Lua"; |
67 | license = licenses.mit; | 69 | license = licenses.mit; |
@@ -65,7 +65,7 @@ in rec { | |||
65 | prosody = pkgs.callPackage ./customized/prosody.nix ({ | 65 | prosody = pkgs.callPackage ./customized/prosody.nix ({ |
66 | inherit (pkgs.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luazlib luasec; | 66 | inherit (pkgs.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luazlib luasec; |
67 | lua5 = pkgs.lua5_1; | 67 | lua5 = pkgs.lua5_1; |
68 | communityModules = ["mod_carbons" "mod_reload_modules" "mod_csi" "mod_cloud_notify" "mod_csi_pump" "mod_smacks" "mod_track_muc_joins" "mod_watchuntrusted"]; | 68 | withCommunityModules = ["mod_carbons" "mod_reload_modules" "mod_csi" "mod_cloud_notify" "mod_csi_pump" "mod_smacks" "mod_track_muc_joins" "mod_watchuntrusted"]; |
69 | extraModules = [prosodyAuth]; | 69 | extraModules = [prosodyAuth]; |
70 | extraLibs = [luaPam luaPosix luaSha2]; | 70 | extraLibs = [luaPam luaPosix luaSha2]; |
71 | }); | 71 | }); |