prosody: 0.11.13 -> 0.12.0
See https://blog.prosody.im/prosody-0.12.0-released for more informations. We remove the various lua wrappers introduced by6799a91843
and16d0b4a69f
. It seems like we don't need them anymore. I'm not brave enough to dig into the Lua machinery to see what resolved that. Sorry, you'll have to trust me on that one. We should probably think about the migration from http_upload to http_file_share for the NixOS module. It's not trivial, we need to make sure we don't break the already uploaded URLs.
This commit is contained in:
parent
0e630462da
commit
20693a1e73
2 changed files with 9 additions and 21 deletions
|
@ -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}
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue