diff --git a/gajim/common/configpaths.py b/gajim/common/configpaths.py index 1a1e601de..979181bf7 100644 --- a/gajim/common/configpaths.py +++ b/gajim/common/configpaths.py @@ -28,13 +28,18 @@ import sys import tempfile from pathlib import Path +import gajim from gajim.common.const import PathType, PathLocation def get(key): if key == 'PLUGINS_DIRS': - return [_paths['PLUGINS_BASE'], - _paths['PLUGINS_USER']] + if gajim.IS_FLATPAK: + return ['/app/plugins', + _paths['PLUGINS_BASE']] + else: + return [_paths['PLUGINS_BASE'], + _paths['PLUGINS_USER']] return _paths[key] diff --git a/org.gajim.Gajim.json b/org.gajim.Gajim.json index 802cf1f88..2a5244ca6 100644 --- a/org.gajim.Gajim.json +++ b/org.gajim.Gajim.json @@ -22,8 +22,19 @@ "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro", "--talk-name=ca.desrt.dconf", - "--env=DCONF_USER_CONFIG_DIR=.config/dconf" + "--env=DCONF_USER_CONFIG_DIR=.config/dconf", + /* extensions */ + "--env=PYTHONPATH=/app/plugins/lib/python3.5/site-packages" ], + "add-extensions": { + "org.gajim.Gajim.Plugin": { + "directory": "plugins", + "merge-dirs": "lib/python3.5/site-packages", + "subdirectories": true, + "no-autodownload": true, + "autodelete": true + } + }, "build-options": { "cflags": "-O2 -g", "cxxflags": "-O2 -g" @@ -370,6 +381,9 @@ "sha256": "02f71f0921d67433ecdca7f0b682a63cadaa7a057fa68608f1ec7ce3fae44fb9", "dest": "gajim/data/plugins/plugin_installer" } + ], + "post-install": [ + "install -d /app/plugins" ] } ]