guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: gajim: Honour $GAJIM_PLUGIN_PATH.


From: guix-commits
Subject: 02/02: gnu: gajim: Honour $GAJIM_PLUGIN_PATH.
Date: Thu, 19 Nov 2020 16:19:41 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit c18803f28dce7f9beb2c81aead253d86b05618e7
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Thu Nov 19 15:20:14 2020 +0100

    gnu: gajim: Honour $GAJIM_PLUGIN_PATH.
    
    This allows Gajim to find plug-ins installed with Guix.
    Reported at <http://issues.guix.gnu.org/44730>.
    
    However, at the time of pushing both packaged plug-ins (gajim-omemo and
    gajim-openpgp) require an unstable version of Gajim and will not load.
    
    * gnu/packages/messaging.scm (gajim)[arguments]: Replace the
    ‘add-plugin-dirs’ substitution phase with a...
    [source]: ...patch that won't silently break in the future.
    * gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                              |  1 +
 gnu/packages/messaging.scm                                | 13 ++-----------
 gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch | 11 +++++++++++
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index a1da838..e728ed2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -990,6 +990,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-honour-GAJIM_PLUGIN_PATH.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 624ad72..99131dc 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -743,7 +743,8 @@ of xmpppy.")
                        (version-major+minor version)
                        "/gajim-" version ".tar.gz"))
        (sha256
-        (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx"))))
+        (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx"))
+       (patches (search-patches "gajim-honour-GAJIM_PLUGIN_PATH.patch"))))
     (build-system python-build-system)
     (arguments
      `(#:imported-modules
@@ -756,16 +757,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.
diff --git a/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch 
b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch
new file mode 100644
index 0000000..cb33131
--- /dev/null
+++ b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch
@@ -0,0 +1,11 @@
+--- a/gajim/common/configpaths.py      2020-11-19 12:12:02.004414323 +0100
++++ a/gajim/common/configpaths.py      2020-11-19 15:34:52.211476895 +0100
+@@ -47,7 +47,7 @@
+         return [Path(_paths['PLUGINS_BASE']),
+                 Path('/app/plugins')]
+     return [Path(_paths['PLUGINS_BASE']),
+-            Path(_paths['PLUGINS_USER'])]
++            Path(_paths['PLUGINS_USER'])] + 
([Path(os.getenv('GAJIM_PLUGIN_PATH'))] if os.getenv('GAJIM_PLUGIN_PATH') and 
Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() else [])
+ 
+ 
+ def get_paths(type_: PathType) -> Generator[str, None, None]:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]