guix-patches
[Top][All Lists]
Advanced

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

[bug#68556] [PATCH gnome-team v5 2/8] gnu: gnome-shell-extensions: Wrap


From: Vivien Kraus
Subject: [bug#68556] [PATCH gnome-team v5 2/8] gnu: gnome-shell-extensions: Wrap apps-menu.
Date: Fri, 19 Jan 2024 23:36:05 +0100
User-agent: Evolution 3.48.4

* gnu/packages/gnome.scm (gnome-shell-extensions) [#:phases]: Add
'wrap-applications-menu.
[native-inputs]: Add gobject-introspection.
[inputs]: Add gnome-menus.

Change-Id: I58b79ca92fbceebb9bbb150102fa428022e3eb63
---
 gnu/packages/gnome.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1e08e027c3..04fc0500cd 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10725,11 +10725,34 @@ (define-public gnome-shell-extensions
                 "1aq1n75m1svsv0ppg66n9qch26rhjxcv3q33a3skf7hsydr5wd4c"))))
     (build-system meson-build-system)
     (arguments
-     '(#:configure-flags '("-Dextension_set=all")))
+     (list
+      #:configure-flags #~'("-Dextension_set=all")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'wrap-applications-menu
+            (lambda _
+              (use-modules (ice-9 textual-ports))
+              (call-with-output-file 
"extensions/apps-menu/extension.js-wrapped"
+                (lambda (out)
+                  (format out "'~a'.split(':').forEach("
+                          (getenv "GI_TYPELIB_PATH"))
+                  (display
+                   (string-append "path => imports.gi.GIRepository.Repository"
+                                  ".prepend_search_path(path));\n")
+                   out)
+                  (display
+                   (call-with-input-file "extensions/apps-menu/extension.js"
+                     get-string-all)
+                   out)))
+              (rename-file "extensions/apps-menu/extension.js-wrapped"
+                           "extensions/apps-menu/extension.js"))))))
     (native-inputs
      (list `(,glib "bin")
            gettext-minimal
+           gobject-introspection ;to set GI_TYPELIB_PATH
            pkg-config))
+    (inputs
+     (list gnome-menus)) ;for Applications Menu
     (propagated-inputs
      (list glib))
     (synopsis "Extensions for GNOME Shell")
-- 
2.41.0





reply via email to

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