about summary refs log tree commit diff
path: root/pkgs/servers/xmpp/prosody/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/xmpp/prosody/default.nix')
-rw-r--r--pkgs/servers/xmpp/prosody/default.nix26
1 files changed, 15 insertions, 11 deletions
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index 773632328a056..5d0ed06b5ae07 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -5,6 +5,7 @@
 , withDBI ? true
 # use withExtraLibs to add additional dependencies of community modules
 , withExtraLibs ? [ ]
+, withExtraLuaPackages ? _: [ ]
 , withOnlyInstalledCommunityModules ? [ ]
 , withCommunityModules ? [ ] }:
 
@@ -17,10 +18,11 @@ let
     ]
     ++ lib.optional withLibevent p.luaevent
     ++ lib.optional withDBI p.luadbi
+    ++ withExtraLuaPackages p
   );
 in
 stdenv.mkDerivation rec {
-  version = "0.11.10"; # also update communityModules
+  version = "0.11.12"; # also update communityModules
   pname = "prosody";
   # The following community modules are necessary for the nixos module
   # prosody module to comply with XEP-0423 and provide a working
@@ -34,7 +36,7 @@ stdenv.mkDerivation rec {
   ];
   src = fetchurl {
     url = "https://prosody.im/downloads/source/${pname}-${version}.tar.gz";
-    sha256 = "1q84s9cq7cgzd295qxa2iy0r3vd3v3chbck62bdx3pd6skk19my6";
+    sha256 = "03an206bl3h2lqcgv1wfvc2bqjq6m9vjb2idw0vyvczm43c55kan";
   };
 
   # A note to all those merging automated updates: Please also update this
@@ -42,8 +44,8 @@ stdenv.mkDerivation rec {
   # version.
   communityModules = fetchhg {
     url = "https://hg.prosody.im/prosody-modules";
-    rev = "64fafbeba14d";
-    sha256 = "02gj1b8sdmdvymsdmjpq47zrl7sg578jcdxbbq18s44f3njmc9q1";
+    rev = "bd0a1f917d98";
+    sha256 = "0figx0b0y5zfk5anf16h20y4crjmpb6bkg30vl7p0m594qnyqjcx";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -63,30 +65,32 @@ stdenv.mkDerivation rec {
     make -C tools/migration
   '';
 
+  luaEnvPath = lua.pkgs.lib.genLuaPathAbsStr luaEnv;
+  luaEnvCPath = lua.pkgs.lib.genLuaCPathAbsStr luaEnv;
+
   # the wrapping should go away once lua hook is fixed
   postInstall = ''
       ${concatMapStringsSep "\n" (module: ''
         cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
       '') (lib.lists.unique(nixosModuleDeps ++ withCommunityModules ++ withOnlyInstalledCommunityModules))}
       wrapProgram $out/bin/prosody \
-        --prefix LUA_PATH ';' "$LUA_PATH" \
-        --prefix LUA_CPATH ';' "$LUA_CPATH"
+        --set LUA_PATH "$luaEnvPath" \
+        --set LUA_CPATH "$luaEnvCPath"
       wrapProgram $out/bin/prosodyctl \
         --add-flags '--config "/etc/prosody/prosody.cfg.lua"' \
-        --prefix LUA_PATH ';' "$LUA_PATH" \
-        --prefix LUA_CPATH ';' "$LUA_CPATH"
+        --set LUA_PATH "$luaEnvPath" \
+        --set LUA_CPATH "$luaEnvCPath"
 
       make -C tools/migration install
       wrapProgram $out/bin/prosody-migrator \
-        --prefix LUA_PATH ';' "$LUA_PATH" \
-        --prefix LUA_CPATH ';' "$LUA_CPATH"
+        --set LUA_PATH "$luaEnvPath" \
+        --set LUA_CPATH "$luaEnvCPath"
     '';
 
   passthru = {
     communityModules = withCommunityModules;
     tests = {
       main = nixosTests.prosody;
-      mysql = nixosTests.prosodyMysql;
     };
   };