@@ -9381,6 +9381,7 @@ (define-public gnome-shell
(add-after 'install 'wrap-programs
(lambda* (#:key inputs #:allow-other-keys)
(let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))
+ (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
(python-path
(string-join
(filter (lambda (item)
@@ -9405,7 +9406,39 @@ (define-public gnome-shell
(wrap-program (string-append #$output "/bin/" prog)
`("GUIX_PYTHONPATH" ":" prefix (,python-path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
- '("gnome-shell-perf-tool")))))
+ '("gnome-shell-perf-tool"))
+ ;; Make a wrapper for the screencast service
+ ;; Requires a pipewire service running
+ ;; (i.e. as provided by home-pipewire-service-type)
+ (let* ((screencast "org.gnome.Shell.Screencast")
+ (dir (string-append #$output "/share/gnome-shell/"))
+ (dbus-service-dir (string-append #$output
+ "/share/dbus-1/"
+ "services/"))
+ (wrapper (string-append dir screencast "-wrapper")))
+ (call-with-output-file wrapper
+ (lambda (port)
+ (format port
+ (string-append
+ "#!~a~%"
+ "export GI_TYPELIB_PATH=~a~%"
+ "export GST_PLUGIN_SYSTEM_PATH=~a~%"
+ "exec \"~a\" \"~a\" \"$@\"~%")
+ (which "bash")
+ (format #f "\"~a${~a:+:}$~a\""
+ gi-typelib-path
+ "GI_TYPELIB_PATH" "GI_TYPELIB_PATH")
+ (format #f "\"~a${~a:+:}$~a\""
+ gst-plugin-path
+ "GST_PLUGIN_SYSTEM_PATH"
+ "GST_PLUGIN_SYSTEM_PATH")
+ (string-append #$(this-package-input "gjs")
+ "/bin/gjs")
+ (string-append dir screencast))))
+ (chmod wrapper #o555)
+ (substitute* (string-append dbus-service-dir screencast
+ ".service")
+ (("Exec=.*") (string-append "Exec=" wrapper "\n")))))))
(add-after 'install 'rewire
(lambda* (#:key inputs #:allow-other-keys)
(for-each
@@ -9465,6 +9498,7 @@ (define-public gnome-shell
gnome-settings-daemon
graphene
gst-plugins-base
+ gst-plugins-good
ibus
libcanberra
libcroco
@@ -9475,6 +9509,7 @@ (define-public gnome-shell
mesa-headers
mutter
network-manager-applet
+ pipewire
polkit
pulseaudio
python-pygobject