Subject: [bug#32102] [PATCH v2 2/2] gnu: gajim: Combine wrap-program phases.

From: Arun Isaac <[email-masked]>
Date: Thu, 12 Jul 2018 00:56:52 +0530

* gnu/packages/messaging.scm (gajim)[arguments]: Combine wrap-program phases
into a single wrap-gajim phase.
---
 gnu/packages/messaging.scm | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index cdcd1225f..89946a685 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Andy Patterson <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018 Clément Lassieur <[email-masked]>
 ;;; Copyright © 2017 Mekeor Melire <[email-masked]>
-;;; Copyright © 2017 Arun Isaac <[email-masked]>
+;;; Copyright © 2017, 2018 Arun Isaac <[email-masked]>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2017 Theodoros Foradis <[email-masked]>
 ;;; Copyright © 2017 Rutger Helling <[email-masked]>
@@ -586,17 +586,6 @@ was initially a fork of xmpppy, but uses non-blocking sockets.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'install 'wrap-program
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (for-each
-                (lambda (name)
-                  (let ((file (string-append out "/bin/" name))
-                        (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
-                    (wrap-program file
-                      `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))
-                '("gajim" "gajim-remote" "gajim-history-manager")))
-             #t))
          (add-before 'check 'remove-test-resolver
            ;; This test requires network access.
            (lambda _
@@ -628,14 +617,22 @@ was initially a fork of xmpppy, but uses non-blocking sockets.")
                  (symlink adwaita "Adwaita")
                  (copy-recursively hicolor "hicolor")))
              #t))
-         (add-after 'install-icons 'wrap-program
+         (add-after 'install-icons 'wrap-gajim
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/gajim")
-               ;; For GtkFileChooserDialog.
-               `("GSETTINGS_SCHEMA_DIR" =
-                 (,(string-append (assoc-ref inputs "gtk+")
-                                  "/share/glib-2.0/schemas")))))))))
+             (let ((out (assoc-ref outputs "out")))
+               (for-each
+                (lambda (name)
+                  (let ((file (string-append out "/bin/" name))
+                        (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+                    (wrap-program file
+                      `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))
+                '("gajim" "gajim-remote" "gajim-history-manager"))
+               (wrap-program (string-append out "/bin/gajim")
+                 ;; For GtkFileChooserDialog.
+                 `("GSETTINGS_SCHEMA_DIR" =
+                   (,(string-append (assoc-ref inputs "gtk+")
+                                    "/share/glib-2.0/schemas")))))
+             #t)))))
     (native-inputs
      `(("intltool" ,intltool)
        ("xorg-server" ,xorg-server)))
-- 
2.15.1