summary refs log tree commit diff
path: root/pkgs/servers/xmpp
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2018-03-22 03:40:46 +0100
committerRobin Gloster <mail@glob.in>2018-03-22 03:40:46 +0100
commit0a80f2c0f4284428235b0f54e228f6e76f1673a7 (patch)
treee47d5435c8f3cbca827633637af674f1f051b624 /pkgs/servers/xmpp
parent88f06c5ce9800d661fa85c019838fe67635aa64f (diff)
downloadnixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.gz
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.bz2
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.lz
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.xz
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.zst
nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.zip
prosody: improve module handling
Diffstat (limited to 'pkgs/servers/xmpp')
-rw-r--r--pkgs/servers/xmpp/prosody/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index 1567a4a6b30..2d0e1a529da 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -4,6 +4,7 @@
 , withDBI ? true, luadbi ? null
 # use withExtraLibs to add additional dependencies of community modules
 , withExtraLibs ? [ ]
+, withOnlyInstalledCommunityModules ? [ ]
 , withCommunityModules ? [ ] }:
 
 assert withLibevent -> luaevent != null;
@@ -38,7 +39,8 @@ stdenv.mkDerivation rec {
     sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1";
   };
 
-  buildInputs = [ lua5 makeWrapper libidn openssl ];
+  buildInputs = [ lua5 makeWrapper libidn openssl ]
+    ++ optional withDBI luadbi;
 
   configureFlags = [
     "--ostype=linux"
@@ -49,7 +51,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
       ${concatMapStringsSep "\n" (module: ''
         cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
-      '') withCommunityModules}
+      '') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
       wrapProgram $out/bin/prosody \
         --set LUA_PATH '${luaPath};' \
         --set LUA_CPATH '${luaCPath};'
@@ -59,11 +61,13 @@ stdenv.mkDerivation rec {
         --set LUA_CPATH '${luaCPath};'
     '';
 
+  passthru.communityModules = withCommunityModules;
+
   meta = {
     description = "Open-source XMPP application server written in Lua";
     license = licenses.mit;
     homepage = https://prosody.im;
     platforms = platforms.linux;
-    maintainers = [ ];
+    maintainers = with maintainers; [ fpletz globin ];
   };
 }