Subject: [PATCH 3/3] gnu: mozo: Wrap python and gi dependencies.

From: Dariqq <[email-masked]>
Date: Sun, 6 Oct 2024 08:33:20 +0000

* gnu/packages/mate.scm (mozo)
[#:phases]: Add 'python-and-gi-wrap phase.
[inputs]: Add gtk+ and mate-panel.

Change-Id: I322878083101b5c05da53fe13092afa037e32736
---
 gnu/packages/mate.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index 974c54bd27..1ab834b339 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -29,6 +29,7 @@ (define-module (gnu packages mate)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
@@ -1548,11 +1549,28 @@ (define-public mozo
        (sha256
         (base32 "0929yk7g7103d18p400ysi19pqrxl3dyzg4l0mnw7a3azm7ri67y"))))
     (build-system glib-or-gtk-build-system)
+    (arguments
+     (list
+      #:imported-modules `((guix build python-build-system)
+                           ,@%glib-or-gtk-build-system-modules)
+      #:modules '((guix build utils)
+                  (guix build glib-or-gtk-build-system)
+                  ((guix build python-build-system) #:prefix python:))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (wrap-program (search-input-file outputs "bin/mozo")
+                `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
+                                       ,(python:site-packages inputs outputs)))
+                `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
     (native-inputs
      (list pkg-config))
     (inputs
      (list gettext-minimal
+           gtk+
            mate-menus
+           mate-panel
            python
            python-pygobject))
     (home-page "https://mate-desktop.org/")
-- 
2.46.0