unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44730] [GAJIM]: Fix loading of installed plugins
@ 2020-11-18 20:50 Raghav Gururajan
  2020-11-19 14:44 ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Raghav Gururajan @ 2020-11-18 20:50 UTC (permalink / raw)
  To: 44730; +Cc: Julien Lepiller


[-- Attachment #1.1.1: Type: text/plain, Size: 195 bytes --]

Hello Guix!

Please find the attached patch to fix plugins issue in Gajim.

@Julien
Will you be able to push this patch? This patch is a follow-up of #43575.

Thank you!

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-gajim-Fix-loading-of-os-installed-plugins.patch --]
[-- Type: text/x-patch, Size: 3943 bytes --]

From efa57cb42f620009b13f27774167e452d40a318b Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Wed, 18 Nov 2020 15:33:24 -0500
Subject: [PATCH] gnu: gajim: Fix loading of os-installed plugins.

* gnu/packages/messaging.scm (gajim) [patches]: Add gajim-plugins-os.patch.
[arguments]<#:phases>['add-plugins-dir]: Remove phase.
[native-search-paths]: Modify.
* gnu/packages/patches/gajim-plugins-os.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                |  1 +
 gnu/packages/messaging.scm                  | 14 +++---------
 gnu/packages/patches/gajim-plugins-os.patch | 25 +++++++++++++++++++++
 3 files changed, 29 insertions(+), 11 deletions(-)
 create mode 100644 gnu/packages/patches/gajim-plugins-os.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 217c05eab6..53bda11011 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -991,6 +991,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/freedink-engine-fix-sdl-hints.patch	\
   %D%/packages/patches/freeimage-unbundle.patch		\
   %D%/packages/patches/fuse-overlapping-headers.patch				\
+  %D%/packages/patches/gajim-plugins-os.patch				\
   %D%/packages/patches/ganeti-deterministic-manual.patch	\
   %D%/packages/patches/ganeti-disable-version-symlinks.patch	\
   %D%/packages/patches/ganeti-drbd-compat.patch			\
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 624ad72c23..714cfa27d6 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -742,6 +742,8 @@ of xmpppy.")
         (string-append "https://gajim.org/downloads/"
                        (version-major+minor version)
                        "/gajim-" version ".tar.gz"))
+       (patches
+        (search-patches "gajim-plugins-os.patch"))
        (sha256
         (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx"))))
     (build-system python-build-system)
@@ -756,16 +758,6 @@ of xmpppy.")
         (guix build utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'add-plugin-dirs
-           (lambda _
-             (substitute* "gajim/common/configpaths.py"
-               (("_paths\\['PLUGINS_USER'\\]\\]")
-                "_paths['PLUGINS_USER']] + \
-([os.getenv('GAJIM_PLUGIN_PATH')] \
-if os.getenv('GAJIM_PLUGIN_PATH') \
-and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() \
-else [])"))
-             #t))
          (replace 'check
            (lambda _
              ;; Tests require a running X server.
@@ -795,7 +787,7 @@ else [])"))
     (native-search-paths
      (list
       (search-path-specification
-       (variable "GAJIM_PLUGIN_PATH")
+       (variable "PLUGINS_OS")
        (separator #f)                   ;single entry
        (files
         (list
diff --git a/gnu/packages/patches/gajim-plugins-os.patch b/gnu/packages/patches/gajim-plugins-os.patch
new file mode 100644
index 0000000000..39c22803f7
--- /dev/null
+++ b/gnu/packages/patches/gajim-plugins-os.patch
@@ -0,0 +1,25 @@
+From c1974d64e5b8f03dc5fc9564f4dd8cff5f2cbc9b Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <raghavgururajan@disroot.org>
+Date: Wed, 18 Nov 2020 15:12:45 -0500
+Subject: [PATCH] [PATCH]: Fix loading of plugins installed via OS's package
+ manager.
+
+---
+ gajim/common/configpaths.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gajim/common/configpaths.py b/gajim/common/configpaths.py
+index 0ac879314..57b99f955 100644
+--- a/gajim/common/configpaths.py
++++ b/gajim/common/configpaths.py
+@@ -47,6 +47,7 @@ def get_plugin_dirs() -> List[Path]:
+         return [Path(_paths['PLUGINS_BASE']),
+                 Path('/app/plugins')]
+     return [Path(_paths['PLUGINS_BASE']),
++            Path(os.getenv['PLUGINS_OS']),
+             Path(_paths['PLUGINS_USER'])]
+ 
+ 
+-- 
+2.29.2
+
-- 
2.29.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-20  0:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 20:50 [bug#44730] [GAJIM]: Fix loading of installed plugins Raghav Gururajan
2020-11-19 14:44 ` Tobias Geerinckx-Rice via Guix-patches via
2020-11-19 20:50   ` Raghav Gururajan
2020-11-19 21:44     ` Raghav Gururajan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).