diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index 42596ccfefd9..7920e4b26345 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -820,6 +820,7 @@ in '') cfg.muc} ${ lib.optionalString (cfg.uploadHttp != null) '' + -- TODO: think about migrating this to mod-http_file_share instead. Component ${toLua cfg.uploadHttp.domain} "http_upload" http_upload_file_size_limit = ${cfg.uploadHttp.uploadFileSizeLimit} http_upload_expire_after = ${cfg.uploadHttp.uploadExpireAfter} diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index 6b70c4cc9874..0d00e48f48ad 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, lib, libidn, openssl, makeWrapper, fetchhg +, icu , lua , nixosTests , withLibevent ? true @@ -13,7 +14,7 @@ with lib; let luaEnv = lua.withPackages(p: with p; [ - luasocket luasec luaexpat luafilesystem luabitop luadbi-sqlite3 + luasocket luasec luaexpat luafilesystem luabitop luadbi-sqlite3 luaunbound ] ++ lib.optional withLibevent p.luaevent ++ lib.optional withDBI p.luadbi @@ -21,21 +22,19 @@ let ); in stdenv.mkDerivation rec { - version = "0.11.13"; # also update communityModules + version = "0.12.0"; # 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 # default setup. nixosModuleDeps = [ - "bookmarks" "cloud_notify" "vcard_muc" - "smacks" "http_upload" ]; src = fetchurl { url = "https://prosody.im/downloads/source/${pname}-${version}.tar.gz"; - sha256 = "sha256-OcYbNGoJtRJbYEy5aeFCBsu8uGyBFW/8a6LWJSfPBDI="; + sha256 = "sha256-dS/zIBXaxWX8NBfCGWryaJccNY7gZuUfXZEkE1gNiJo="; }; # A note to all those merging automated updates: Please also update this @@ -43,13 +42,13 @@ stdenv.mkDerivation rec { # version. communityModules = fetchhg { url = "https://hg.prosody.im/prosody-modules"; - rev = "54fa2116bbf3"; - sha256 = "sha256-OKZ7tD75q8/GMXruUQ+r9l0BxzdbPHNf41fZ3fHVQVw="; + rev = "65438e4ba563"; + sha256 = "sha256-zHOrMzcgHOdBl7nObM+OauifbcmKEOfAuj81MDSoLMk="; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ - luaEnv libidn openssl + luaEnv libidn openssl icu ] ++ withExtraLibs; @@ -63,26 +62,14 @@ 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 ';' "$luaEnvPath" \ - --prefix LUA_CPATH ';' "$luaEnvCPath" wrapProgram $out/bin/prosodyctl \ - --add-flags '--config "/etc/prosody/prosody.cfg.lua"' \ - --prefix LUA_PATH ';' "$luaEnvPath" \ - --prefix LUA_CPATH ';' "$luaEnvCPath" - + --add-flags '--config "/etc/prosody/prosody.cfg.lua"' make -C tools/migration install - wrapProgram $out/bin/prosody-migrator \ - --prefix LUA_PATH ';' "$luaEnvPath" \ - --prefix LUA_CPATH ';' "$luaEnvCPath" ''; passthru = {