From 226965da67c25bbad0c6c0cc6d21b64a647beed8 Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Fri, 22 Dec 2017 01:17:48 +0100 Subject: prosody: 0.9.12 -> 0.10.0 updating config options, removing luazlib as mod_compression was removed for security reasons. --- pkgs/servers/xmpp/prosody/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'pkgs/servers/xmpp') diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index b0e3492c0da..eb3e858ac4d 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -1,14 +1,12 @@ { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg , 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; @@ -16,7 +14,6 @@ with stdenv.lib; let libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent - ++ optional withZlib luazlib ++ optional withDBI luadbi ++ withExtraLibs; getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}"; @@ -27,12 +24,12 @@ let in stdenv.mkDerivation rec { - version = "0.9.12"; + version = "0.10.0"; name = "prosody-${version}"; src = fetchurl { url = "http://prosody.im/downloads/source/${name}.tar.gz"; - sha256 = "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s"; + sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l"; }; communityModules = fetchhg { @@ -65,7 +62,7 @@ stdenv.mkDerivation rec { meta = { description = "Open-source XMPP application server written in Lua"; license = licenses.mit; - homepage = http://www.prosody.im; + homepage = https://prosody.im; platforms = platforms.linux; maintainers = [ ]; }; -- cgit 1.4.1 From 2c0b230330b3292e31f1de2392a293db6bede69e Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Fri, 22 Dec 2017 01:20:01 +0100 Subject: prosody: update community modules --- pkgs/servers/xmpp/prosody/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/servers/xmpp') diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index eb3e858ac4d..1567a4a6b30 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -34,8 +34,8 @@ stdenv.mkDerivation rec { communityModules = fetchhg { url = "https://hg.prosody.im/prosody-modules"; - rev = "9a3e51f348fe"; - sha256 = "09g4vi52rv0r3jzcm0bsgp4ngqq6iapfbxfh0l7qj36qnajp4vm6"; + rev = "150a7bd59043"; + sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1"; }; buildInputs = [ lua5 makeWrapper libidn openssl ]; -- cgit 1.4.1 From 0a80f2c0f4284428235b0f54e228f6e76f1673a7 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 03:40:46 +0100 Subject: prosody: improve module handling --- nixos/doc/manual/release-notes/rl-1803.xml | 5 +++++ nixos/modules/services/networking/prosody.nix | 14 +++++++++++--- pkgs/servers/xmpp/prosody/default.nix | 10 +++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) (limited to 'pkgs/servers/xmpp') diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 20f23261b60..e67f1448466 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -347,6 +347,11 @@ following incompatible changes: The better-performing libevent backend is now enabled by default. + + + withCommunityModules now passes through the modules to . + Use withOnlyInstalledCommunityModules for modules that should not be enabled directly, e.g lib_ldap. + diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index a7b43fb78a9..d57ebb61f63 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -362,6 +362,12 @@ in description = "Enable custom modules"; }; + extraPluginPaths = mkOption { + type = types.listOf types.path; + default = []; + description = "Addtional path in which to look find plugins/modules"; + }; + virtualHosts = mkOption { description = "Define the virtual hosts"; @@ -411,16 +417,18 @@ in config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.prosody ]; + environment.systemPackages = [ cfg.package ]; environment.etc."prosody/prosody.cfg.lua".text = '' pidfile = "/var/lib/prosody/prosody.pid" - log = "*syslog" data_path = "/var/lib/prosody" + plugin_paths = { + ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) } + } ${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) } @@ -434,7 +442,7 @@ in ${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList (name: val: optionalString val "${toLua name};") cfg.modules) } - + ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)} ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)} }; 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 ]; }; } -- cgit 1.4.1