unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#52521] [PATCH] gnu: Make GNOME Shell Extensions configurable again.
@ 2021-12-15 19:40 Liliana Marie Prikler
  2021-12-31 14:07 ` bug#52521: " Liliana Marie Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Liliana Marie Prikler @ 2021-12-15 19:40 UTC (permalink / raw)
  To: 52521

* gnu/packages/gnome.scm (gnome-shell)[#:phases]: Adjust ‘wrap’ phase, so
that “gnome-extensions-app” gets GI_TYPELIB_PATH set.
Add ‘rewire’ phase to replace the blurb that deprecated commands print in
favour of one that doesn't point towards external packages.
---
 gnu/packages/gnome.scm | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index bbc768527d..46ab07c7ac 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8710,14 +8710,38 @@ (define-public gnome-shell
              (let ((out              (assoc-ref outputs "out"))
                    (gi-typelib-path  (getenv "GI_TYPELIB_PATH"))
                    (python-path      (getenv "GUIX_PYTHONPATH")))
-               (wrap-program (string-append out "/bin/gnome-shell")
-                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
+               (for-each
+                (lambda (prog)
+                  (wrap-program (string-append out "/bin/" prog)
+                    `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+                '("gnome-shell" "gnome-extensions-app"))
+               (substitute* (string-append out "/share/gnome-shell/"
+                                           "org.gnome.Shell.Extensions")
+                 (("imports\\.package\\.start" all)
+                  (string-append "'" gi-typelib-path "'.split(':').forEach("
+                                 "path => imports.gi.GIRepository.Repository."
+                                 "prepend_search_path(path));\n"
+                                 all)))
                (for-each
                 (lambda (prog)
                   (wrap-program (string-append out "/bin/" prog)
                     `("GUIX_PYTHONPATH"      ":" prefix (,python-path))
                     `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
-                '("gnome-shell-extension-tool" "gnome-shell-perf-tool")))))
+                '("gnome-shell-perf-tool")))))
+         (add-after 'install 'rewire
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (for-each
+              (lambda (tool)
+                (call-with-output-file (string-append
+                                        (assoc-ref outputs "out")
+                                        "/bin/" tool)
+                  (lambda (port)
+                    (format port "#!~a
+printf '~a is deprecated.  Use the \"gnome-extensions\" CLI or \
+\"gnome-extensions-app\" instead.\\n'"
+                            (search-input-file inputs "bin/bash")
+                            tool))))
+              '("gnome-shell-extension-tool" "gnome-shell-extension-prefs"))))
          (replace 'glib-or-gtk-wrap
            (let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap)))
              (lambda* (#:key inputs outputs #:allow-other-keys #:rest rest)
-- 
2.34.0






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

* bug#52521: [PATCH] gnu: Make GNOME Shell Extensions configurable again.
  2021-12-15 19:40 [bug#52521] [PATCH] gnu: Make GNOME Shell Extensions configurable again Liliana Marie Prikler
@ 2021-12-31 14:07 ` Liliana Marie Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Liliana Marie Prikler @ 2021-12-31 14:07 UTC (permalink / raw)
  To: 52521-done

Am Mittwoch, dem 15.12.2021 um 20:40 +0100 schrieb Liliana Marie
Prikler:
> * gnu/packages/gnome.scm (gnome-shell)[#:phases]: Adjust ‘wrap’
> phase, so
> that “gnome-extensions-app” gets GI_TYPELIB_PATH set.
> Add ‘rewire’ phase to replace the blurb that deprecated commands
> print in
> favour of one that doesn't point towards external packages.
Done and pushed.




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

end of thread, other threads:[~2021-12-31 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 19:40 [bug#52521] [PATCH] gnu: Make GNOME Shell Extensions configurable again Liliana Marie Prikler
2021-12-31 14:07 ` bug#52521: " Liliana Marie Prikler

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).