3
0
Fork 0
forked from mirrors/nixpkgs

prosody: set lua env in wrapper

This seems to be fallout from #136615
This commit is contained in:
arcnmx 2022-02-11 14:29:43 -08:00
parent 10747dda23
commit 0c1cf5c7b4

View file

@ -63,23 +63,26 @@ stdenv.mkDerivation rec {
make -C tools/migration 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 # the wrapping should go away once lua hook is fixed
postInstall = '' postInstall = ''
${concatMapStringsSep "\n" (module: '' ${concatMapStringsSep "\n" (module: ''
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/ cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
'') (lib.lists.unique(nixosModuleDeps ++ withCommunityModules ++ withOnlyInstalledCommunityModules))} '') (lib.lists.unique(nixosModuleDeps ++ withCommunityModules ++ withOnlyInstalledCommunityModules))}
wrapProgram $out/bin/prosody \ wrapProgram $out/bin/prosody \
--prefix LUA_PATH ';' "$LUA_PATH" \ --prefix LUA_PATH ';' "$luaEnvPath" \
--prefix LUA_CPATH ';' "$LUA_CPATH" --prefix LUA_CPATH ';' "$luaEnvCPath"
wrapProgram $out/bin/prosodyctl \ wrapProgram $out/bin/prosodyctl \
--add-flags '--config "/etc/prosody/prosody.cfg.lua"' \ --add-flags '--config "/etc/prosody/prosody.cfg.lua"' \
--prefix LUA_PATH ';' "$LUA_PATH" \ --prefix LUA_PATH ';' "$luaEnvPath" \
--prefix LUA_CPATH ';' "$LUA_CPATH" --prefix LUA_CPATH ';' "$luaEnvCPath"
make -C tools/migration install make -C tools/migration install
wrapProgram $out/bin/prosody-migrator \ wrapProgram $out/bin/prosody-migrator \
--prefix LUA_PATH ';' "$LUA_PATH" \ --prefix LUA_PATH ';' "$luaEnvPath" \
--prefix LUA_CPATH ';' "$LUA_CPATH" --prefix LUA_CPATH ';' "$luaEnvCPath"
''; '';
passthru = { passthru = {