mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-15 15:37:54 -05:00
gnu: Make GNOME Shell Extensions configurable again.
* 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.
This commit is contained in:
parent
3d85f711f1
commit
cefcddf9ef
1 changed files with 27 additions and 3 deletions
|
@ -8707,14 +8707,38 @@ (define-public gnome-shell
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
|
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
|
||||||
(python-path (getenv "GUIX_PYTHONPATH")))
|
(python-path (getenv "GUIX_PYTHONPATH")))
|
||||||
(wrap-program (string-append out "/bin/gnome-shell")
|
(for-each
|
||||||
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
|
(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
|
(for-each
|
||||||
(lambda (prog)
|
(lambda (prog)
|
||||||
(wrap-program (string-append out "/bin/" prog)
|
(wrap-program (string-append out "/bin/" prog)
|
||||||
`("GUIX_PYTHONPATH" ":" prefix (,python-path))
|
`("GUIX_PYTHONPATH" ":" prefix (,python-path))
|
||||||
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-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
|
(replace 'glib-or-gtk-wrap
|
||||||
(let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap)))
|
(let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap)))
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys #:rest rest)
|
(lambda* (#:key inputs outputs #:allow-other-keys #:rest rest)
|
||||||
|
|
Loading…
Reference in a new issue