Package: guix-patches;
Reported by: Dariqq <dariqq <at> posteo.net>
Date: Mon, 8 Apr 2024 15:50:01 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70282 in the body.
You can then email your comments to 70282 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, rg <at> raghavgururajan.name, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Mon, 08 Apr 2024 15:50:01 GMT) Full text and rfc822 format available.Dariqq <dariqq <at> posteo.net>
:liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, rg <at> raghavgururajan.name, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
.
(Mon, 08 Apr 2024 15:50:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: guix-patches <at> gnu.org Cc: rekado <at> elephly.net, Dariqq <dariqq <at> posteo.net> Subject: [PATCH 0/2] Fix gnome-shell screenrecorder Date: Mon, 8 Apr 2024 15:39:06 +0000
Hello Guix, Last week a user in the irc chat remarked that the built in Gnome screenrecorder is not available which rekado and me then investigated afterwards. This functionality is provided by the org.gnome.Shell.Screencast dbus service which currently fails to start (if for example you try to investigate it with d-spy you get the not really helpful error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Shell.Screencast exited with status 1) We later figured that this error happens because the required typelib files cannot be found. As a fix I imported a patch from NixOS [1] from their gnome-shell 42/44 package and wrapped the relevant files with GI_TYPELIB_PATH. This seems to be strictly necessary only for the screencast service however I wrapped all of the dbus services listed in the js/dbusServices/meson.build file, same as what is done in NixOS. In order for Screencast to work you'll also need pipewire available (I think for the gstreamer plug-in) which is why I added it to gnome-essential-extras in the second patch. You'll also need pipewire running (i.e the home-service) which makes this a bit unintuitive for users. I don't think it is currently possible to enable user level shepherd services from the system configuration, but correct me if I am wrong. Without pipewire running the screen recording stops immediately. As usual i am not sure if the formating/wording of my commit messages and the name I gave the patch are fine. Also thanks to rekado for helping to make sense of this. [1] https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch Dariqq (2): gnu: gnome-shell: Wrap d-bus services. gnu: gnome-essential-extras: Propagate pipewire. gnu/local.mk | 1 + gnu/packages/gnome.scm | 14 ++++- .../gnome-shell-wrappable-dbus-services.patch | 59 +++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch base-commit: cd45294d576975a3bff2f755764a3f46f09ea6f9 -- 2.41.0
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, rg <at> raghavgururajan.name, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Mon, 08 Apr 2024 15:55:02 GMT) Full text and rfc822 format available.Message #8 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Dariqq <dariqq <at> posteo.net> Subject: [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Mon, 8 Apr 2024 15:53:51 +0000
Some of the dbus services can't find typelibs. * gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch: New file * gnu/lokal.mk: Register it. * gnu/packages/gnome.scm (gnome-shell)[arguments]<#:phases>{'wrap}: Also wrap dbus-services. Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 13 +++- .../gnome-shell-wrappable-dbus-services.patch | 59 +++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch diff --git a/gnu/local.mk b/gnu/local.mk index 255bb870e9..21826c9ec7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1376,6 +1376,7 @@ dist_patch_DATA = \ %D%/packages/patches/gnome-online-miners-tracker-3.patch \ %D%/packages/patches/gnome-settings-daemon-gc.patch \ %D%/packages/patches/gnome-session-support-elogind.patch \ + %D%/packages/patches/gnome-shell-wrappable-dbus-services.patch\ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnumach-support-noide.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4934ade3dd..e752232f78 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9311,7 +9311,9 @@ (define-public gnome-shell name "-" version ".tar.xz")) (sha256 (base32 - "01pw9qnnvh64x56z1gqh0qk6vfn0ihh4zijq23f4bpz9wszlbpwf")))) + "01pw9qnnvh64x56z1gqh0qk6vfn0ihh4zijq23f4bpz9wszlbpwf")) + (patches + (search-patches "gnome-shell-wrappable-dbus-services.patch")))) (build-system meson-build-system) (arguments (let ((disallowed-references @@ -9405,7 +9407,14 @@ (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 sure the dbus services can find typelibs + (for-each + (lambda (service) + (wrap-program (string-append #$output "/share/gnome-shell/" service) + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) + '("org.gnome.ScreenSaver" "org.gnome.Shell.Extensions" + "org.gnome.Shell.Notifications" "org.gnome.Shell.Screencast"))))) (add-after 'install 'rewire (lambda* (#:key inputs #:allow-other-keys) (for-each diff --git a/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch b/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch new file mode 100644 index 0000000000..67ed6beadb --- /dev/null +++ b/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch @@ -0,0 +1,59 @@ +Retrieved from NixOS: https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch +--- +diff --git a/js/dbusServices/dbus-service.in b/js/dbusServices/dbus-service.in +old mode 100644 +new mode 100755 +index 524166102..6d0722a1c +--- a/js/dbusServices/dbus-service.in ++++ b/js/dbusServices/dbus-service.in +@@ -1,3 +1,9 @@ ++#!@gjs@ ++ ++// gjs determines the package name from argv[0], which is .*-wrapped ++// so we need to override it to the original one. ++imports.package._findEffectiveEntryPointName = () => '@service@' ++ + imports.package.start({ + name: '@PACKAGE_NAME@', + prefix: '@prefix@', +diff --git a/js/dbusServices/dbus-service.service.in b/js/dbusServices/dbus-service.service.in +index 3b0d09abe..4fd4bb66d 100644 +--- a/js/dbusServices/dbus-service.service.in ++++ b/js/dbusServices/dbus-service.service.in +@@ -1,3 +1,3 @@ + [D-BUS Service] + Name=@service@ +-Exec=@gjs@ @pkgdatadir@/@service@ ++Exec=@pkgdatadir@/@service@ +diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build +index eb941ed90..552051e5a 100644 +--- a/js/dbusServices/meson.build ++++ b/js/dbusServices/meson.build +@@ -2,6 +2,7 @@ launcherconf = configuration_data() + launcherconf.set('PACKAGE_NAME', meson.project_name()) + launcherconf.set('prefix', prefix) + launcherconf.set('libdir', libdir) ++launcherconf.set('gjs', gjs.full_path()) + + dbus_services = { + 'org.gnome.Shell.Extensions': 'extensions', +@@ -18,16 +19,17 @@ endif + config_dir = '@0@/..'.format(meson.current_build_dir()) + + foreach service, dir : dbus_services ++ svc_launcherconf = launcherconf ++ svc_launcherconf.set('service', service) + configure_file( + input: 'dbus-service.in', + output: service, +- configuration: launcherconf, ++ configuration: svc_launcherconf, + install_dir: pkgdatadir, + ) + + serviceconf = configuration_data() + serviceconf.set('service', service) +- serviceconf.set('gjs', gjs.full_path()) + serviceconf.set('pkgdatadir', pkgdatadir) + + configure_file( -- 2.41.0
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, rg <at> raghavgururajan.name, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Mon, 08 Apr 2024 15:55:02 GMT) Full text and rfc822 format available.Message #11 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Dariqq <dariqq <at> posteo.net> Subject: [PATCH 2/2] gnu: gnome-essential-extras: Propagate pipewire. Date: Mon, 8 Apr 2024 15:53:52 +0000
The built-in gnome-shell screencast requries pipewire. * gnu/packages/gnome.scm (gnome-essential-extras): Add pipewire. Change-Id: I6ca5d309f1e6a5f3396b35cfda6d2d470d5b62be --- gnu/packages/gnome.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e752232f78..f6e3c2f03b 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -10329,6 +10329,7 @@ (define-public gnome-essential-extras gst-plugins-good gucharmap hicolor-icon-theme + pipewire pinentry-gnome3 pulseaudio shared-mime-info -- 2.41.0
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Mon, 08 Apr 2024 16:50:03 GMT) Full text and rfc822 format available.Message #14 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 2/2] gnu: gnome-essential-extras: Propagate pipewire. Date: Mon, 08 Apr 2024 18:49:02 +0200
Am Montag, dem 08.04.2024 um 15:53 +0000 schrieb Dariqq: > The built-in gnome-shell screencast requries pipewire. > > * gnu/packages/gnome.scm (gnome-essential-extras): Add pipewire. > > Change-Id: I6ca5d309f1e6a5f3396b35cfda6d2d470d5b62be > --- > gnu/packages/gnome.scm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index e752232f78..f6e3c2f03b 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -10329,6 +10329,7 @@ (define-public gnome-essential-extras > gst-plugins-good > gucharmap > hicolor-icon-theme > + pipewire > pinentry-gnome3 > pulseaudio > shared-mime-info Should pipewire not go into gnome-shell or something else? Propagating it here seems weird.
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Mon, 08 Apr 2024 16:55:01 GMT) Full text and rfc822 format available.Message #17 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Mon, 08 Apr 2024 18:54:29 +0200
Am Montag, dem 08.04.2024 um 15:53 +0000 schrieb Dariqq: > Some of the dbus services can't find typelibs. > > * gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch: New > file > * gnu/lokal.mk: Register it. > * gnu/packages/gnome.scm (gnome-shell)[arguments]<#:phases>{'wrap}: > Also wrap dbus-services. You can skip [arguments] and just write [#:phases]. > > Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 > --- > gnu/local.mk | 1 + > gnu/packages/gnome.scm | 13 +++- > .../gnome-shell-wrappable-dbus-services.patch | 59 > +++++++++++++++++++ > 3 files changed, 71 insertions(+), 2 deletions(-) > create mode 100644 gnu/packages/patches/gnome-shell-wrappable-dbus- > services.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 255bb870e9..21826c9ec7 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -1376,6 +1376,7 @@ dist_patch_DATA > = \ > %D%/packages/patches/gnome-online-miners-tracker-3.patch \ > %D%/packages/patches/gnome-settings-daemon-gc.patch \ > %D%/packages/patches/gnome-session-support-elogind.patch \ > + %D%/packages/patches/gnome-shell-wrappable-dbus-services.patch\ > %D%/packages/patches/gnome-tweaks-search-paths.patch \ > %D%/packages/patches/gnumach-support-noide.patch \ > %D%/packages/patches/gnupg-default-pinentry.patch \ > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 4934ade3dd..e752232f78 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -9311,7 +9311,9 @@ (define-public gnome-shell > name "-" version ".tar.xz")) > (sha256 > (base32 > - > "01pw9qnnvh64x56z1gqh0qk6vfn0ihh4zijq23f4bpz9wszlbpwf")))) > + > "01pw9qnnvh64x56z1gqh0qk6vfn0ihh4zijq23f4bpz9wszlbpwf")) > + (patches > + (search-patches "gnome-shell-wrappable-dbus- > services.patch")))) > (build-system meson-build-system) > (arguments > (let ((disallowed-references > @@ -9405,7 +9407,14 @@ (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 sure the dbus services can find typelibs > + (for-each > + (lambda (service) > + (wrap-program (string-append #$output > "/share/gnome-shell/" service) > + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib- > path)))) > + '("org.gnome.ScreenSaver" > "org.gnome.Shell.Extensions" > + "org.gnome.Shell.Notifications" > "org.gnome.Shell.Screencast"))))) LGTM > (add-after 'install 'rewire > (lambda* (#:key inputs #:allow-other-keys) > (for-each > diff --git a/gnu/packages/patches/gnome-shell-wrappable-dbus- > services.patch b/gnu/packages/patches/gnome-shell-wrappable-dbus- > services.patch > new file mode 100644 > index 0000000000..67ed6beadb > --- /dev/null > +++ b/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch > @@ -0,0 +1,59 @@ > +Retrieved from NixOS: > https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch > +--- > +diff --git a/js/dbusServices/dbus-service.in b/js/dbusServices/dbus- > service.in > +old mode 100644 > +new mode 100755 > +index 524166102..6d0722a1c > +--- a/js/dbusServices/dbus-service.in > ++++ b/js/dbusServices/dbus-service.in > +@@ -1,3 +1,9 @@ > ++#!@gjs@ > ++ > ++// gjs determines the package name from argv[0], which is .*- > wrapped > ++// so we need to override it to the original one. > ++imports.package._findEffectiveEntryPointName = () => '@service@' > ++ Is there no other way to specify the entry point? > + imports.package.start({ > + name: '@PACKAGE_NAME@', > + prefix: '@prefix@', > +diff --git a/js/dbusServices/dbus-service.service.in > b/js/dbusServices/dbus-service.service.in > +index 3b0d09abe..4fd4bb66d 100644 > +--- a/js/dbusServices/dbus-service.service.in > ++++ b/js/dbusServices/dbus-service.service.in > +@@ -1,3 +1,3 @@ > + [D-BUS Service] > + Name=@service@ > +-Exec=@gjs@ @pkgdatadir@/@service@ > ++Exec=@pkgdatadir@/@service@ > +diff --git a/js/dbusServices/meson.build > b/js/dbusServices/meson.build > +index eb941ed90..552051e5a 100644 > +--- a/js/dbusServices/meson.build > ++++ b/js/dbusServices/meson.build > +@@ -2,6 +2,7 @@ launcherconf = configuration_data() > + launcherconf.set('PACKAGE_NAME', meson.project_name()) > + launcherconf.set('prefix', prefix) > + launcherconf.set('libdir', libdir) > ++launcherconf.set('gjs', gjs.full_path()) > + > + dbus_services = { > + 'org.gnome.Shell.Extensions': 'extensions', > +@@ -18,16 +19,17 @@ endif > + config_dir = '@0@/..'.format(meson.current_build_dir()) > + > + foreach service, dir : dbus_services > ++ svc_launcherconf = launcherconf > ++ svc_launcherconf.set('service', service) > + configure_file( > + input: 'dbus-service.in', > + output: service, > +- configuration: launcherconf, > ++ configuration: svc_launcherconf, > + install_dir: pkgdatadir, > + ) > + > + serviceconf = configuration_data() > + serviceconf.set('service', service) > +- serviceconf.set('gjs', gjs.full_path()) > + serviceconf.set('pkgdatadir', pkgdatadir) > + > + configure_file( Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Tue, 09 Apr 2024 14:06:01 GMT) Full text and rfc822 format available.Message #20 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 2/2] gnu: gnome-essential-extras: Propagate pipewire. Date: Tue, 9 Apr 2024 14:05:17 +0000
On 08.04.24 18:49, Liliana Marie Prikler wrote: > Am Montag, dem 08.04.2024 um 15:53 +0000 schrieb Dariqq: >> The built-in gnome-shell screencast requries pipewire. >> >> * gnu/packages/gnome.scm (gnome-essential-extras): Add pipewire. >> >> Change-Id: I6ca5d309f1e6a5f3396b35cfda6d2d470d5b62be >> --- >> gnu/packages/gnome.scm | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm >> index e752232f78..f6e3c2f03b 100644 >> --- a/gnu/packages/gnome.scm >> +++ b/gnu/packages/gnome.scm >> @@ -10329,6 +10329,7 @@ (define-public gnome-essential-extras >> gst-plugins-good >> gucharmap >> hicolor-icon-theme >> + pipewire >> pinentry-gnome3 >> pulseaudio >> shared-mime-info > Should pipewire not go into gnome-shell or something else? Propagating > it here seems weird. I wasn't sure if only the gstreamer plugin of pipewire are required or something else from the pipewire package too and that was the easy solution. I just tested adding pipewire to gnome-shell and adding GST_PLUGIN_SYSTEM_PATH to the wrapper seems to be enough. While working on this I also found that also gst-plugins-good are also required for the Screencast service which will get found using the system profile as it is propagated by gnome-essential-extras. Should that also be added to gnome-shell?
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Tue, 09 Apr 2024 15:36:03 GMT) Full text and rfc822 format available.Message #23 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Tue, 9 Apr 2024 15:35:11 +0000
Hi, On 08.04.24 18:54, Liliana Marie Prikler wrote: >> new file mode 100644 index 0000000000..67ed6beadb --- /dev/null +++ >> b/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch @@ >> -0,0 +1,59 @@ +Retrieved from NixOS: >> https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch >> >> +--- >> +diff --git a/js/dbusServices/dbus-service.in >> b/js/dbusServices/dbus- service.in +old mode 100644 +new mode >> 100755 +index 524166102..6d0722a1c +--- >> a/js/dbusServices/dbus-service.in ++++ >> b/js/dbusServices/dbus-service.in +@@ -1,3 +1,9 @@ ++#!@gjs@ ++ >> ++// gjs determines the package name from argv[0], which is .*- >> wrapped ++// so we need to override it to the original one. >> ++imports.package._findEffectiveEntryPointName = () => '@service@' >> ++ > Is there no other way to specify the entry point? If it is just about the name in argv[0] what about creating a *-wrapper instead and leaving the original file untouched rather than the wrapper replacing the original file? One quick way would be to rename the wrapper script and original file after wrap-program is called, fix the path in the wrapper script and adjust the dbus service file to call the *-wrapper instead. Have a nice day.
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Tue, 09 Apr 2024 17:05:02 GMT) Full text and rfc822 format available.Message #26 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Tue, 09 Apr 2024 19:04:16 +0200
Am Dienstag, dem 09.04.2024 um 15:35 +0000 schrieb Dariqq: > Hi, > > > On 08.04.24 18:54, Liliana Marie Prikler wrote: > > > > new file mode 100644 index 0000000000..67ed6beadb --- /dev/null > > > +++ > > > b/gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch > > > @@ > > > -0,0 +1,59 @@ +Retrieved from NixOS: > > > https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch > > > > > > > +--- > > > +diff --git a/js/dbusServices/dbus-service.in > > > b/js/dbusServices/dbus- service.in +old mode 100644 +new mode > > > 100755 +index 524166102..6d0722a1c +--- > > > a/js/dbusServices/dbus-service.in ++++ > > > b/js/dbusServices/dbus-service.in +@@ -1,3 +1,9 @@ ++#!@gjs@ ++ > > > ++// gjs determines the package name from argv[0], which is .*- > > > wrapped ++// so we need to override it to the original one. > > > ++imports.package._findEffectiveEntryPointName = () => > > > '@service@' > > > ++ > > Is there no other way to specify the entry point? > > If it is just about the name in argv[0] what about creating a *- > wrapper instead and leaving the original file untouched rather than > the wrapper replacing the original file? > > One quick way would be to rename the wrapper script and original file > after wrap-program is called, fix the path in the wrapper script and > adjust the dbus service file to call the *-wrapper instead. > > Have a nice day. You can possibly use wrap-script instead of wrap-program, so that you only need a single file. I've also written Javascript code to expand GI_TYPELIB_PATH in other packages already, perhaps you want to copy that? Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 10 Apr 2024 08:08:03 GMT) Full text and rfc822 format available.Message #29 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Wed, 10 Apr 2024 08:07:08 +0000
On 09.04.24 19:04, Liliana Marie Prikler wrote: > You can possibly use wrap-script instead of wrap-program, so that you > only need a single file. I've also written Javascript code to expand > GI_TYPELIB_PATH in other packages already, perhaps you want to copy > that? > > Cheers Thanks for the hint with the javascript code. This makes the fix even easier as the extra patch is no longer required. But then what to do with pipewire/GST_PLUGIN_SYSTEM_PATH? We would be back at propagating it somewhere. Also do you have an idea how to communicate to users to enable the pipewire home service if they want the screenrecorder to work? Have a nice day.
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 10 Apr 2024 18:21:03 GMT) Full text and rfc822 format available.Message #32 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Wed, 10 Apr 2024 20:20:06 +0200
Am Mittwoch, dem 10.04.2024 um 08:07 +0000 schrieb Dariqq: > > > On 09.04.24 19:04, Liliana Marie Prikler wrote: > > You can possibly use wrap-script instead of wrap-program, so that > > you only need a single file. I've also written Javascript code to > > expand GI_TYPELIB_PATH in other packages already, perhaps you want > > to copy that? > > > > Cheers > > Thanks for the hint with the javascript code. This makes the fix even > easier as the extra patch is no longer required. > > But then what to do with pipewire/GST_PLUGIN_SYSTEM_PATH? We would be > back at propagating it somewhere. > > Also do you have an idea how to communicate to users to enable the > pipewire home service if they want the screenrecorder to work? For pipewire I'm not sure what the problem is, really. For GST_PLUGIN_SYSTEM_PATH you can add a wrapper that amends the environment variable or possibly call some Gst function – either in Guile with wrap-script or possibly in Javascript. Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Thu, 11 Apr 2024 09:06:02 GMT) Full text and rfc822 format available.Message #35 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: rekado <at> elephly.net, Raghav Gururajan <rg <at> raghavgururajan.name>, Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH 1/2] gnu: gnome-shell: Wrap d-bus services. Date: Thu, 11 Apr 2024 09:04:46 +0000
Hi, On 10.04.24 20:20, Liliana Marie Prikler wrote: > Am Mittwoch, dem 10.04.2024 um 08:07 +0000 schrieb Dariqq: >> >> >> On 09.04.24 19:04, Liliana Marie Prikler wrote: >>> You can possibly use wrap-script instead of wrap-program, so that >>> you only need a single file. I've also written Javascript code to >>> expand GI_TYPELIB_PATH in other packages already, perhaps you want >>> to copy that? >>> >>> Cheers >> >> Thanks for the hint with the javascript code. This makes the fix even >> easier as the extra patch is no longer required. >> >> But then what to do with pipewire/GST_PLUGIN_SYSTEM_PATH? We would be >> back at propagating it somewhere. >> >> Also do you have an idea how to communicate to users to enable the >> pipewire home service if they want the screenrecorder to work? > For pipewire I'm not sure what the problem is, really. For > GST_PLUGIN_SYSTEM_PATH you can add a wrapper that amends the > environment variable or possibly call some Gst function – either in > Guile with wrap-script or possibly in Javascript. Unfortunately wrap-script does not work as the file #$gnome-shell/share/gnome-shell/org.gnome.Shell.Screencast has no shebang line set and even if it would ( enabled by the extra patch) gjs is not a valid interpreter for wrap_script and trying to change that rebuilds everything. I am currently trying to find out if it is possible to do a similiar thing as the GI_TYPELIB_PATH with javascript. Or change the environment variable before through another way. My limited javascript knowledge is not helping here either. > Cheers Have a nice day
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Fri, 12 Apr 2024 17:48:03 GMT) Full text and rfc822 format available.Message #38 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: 70282 <at> debbugs.gnu.org Cc: Dariqq <dariqq <at> posteo.net> Subject: [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Fri, 12 Apr 2024 17:26:48 +0000
The screencast service can now find typelibs and gstreamer plugins. * gnu/packages/linux.scm (gnome-shell) [inputs]: Add gst-plugins-good and pipewire. [#:phases]<'wrap-programs>: Create a wrapper for screencast service and use it. Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 --- Hi, Here is v2 of the patch. The wrapper is now created manually as I was unable to find a way to manipulate the gstreamer plugin load path from within javascript. Importantly this leaves the original javascript file untouched and therefore circumvents the argv[0] problem in v1. All the required gstreamer plugins (pipewire and gst-plugins-good) are now inputs and are in the wrapper via GST_PLUGIN_SYSTEM_PATH. I've also left a comment for the required home-pipewire-service. In gnome-shell 45+ the invocation has changed to 'gjs -m service'. Should this also be a comment somewhere? gnu/packages/gnome.scm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4934ade3dd..d68624344f 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -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 base-commit: 3dc26b4eaed448cbc02a80bafb2ebb6d908f2b4e -- 2.41.0
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Fri, 19 Apr 2024 18:52:04 GMT) Full text and rfc822 format available.Message #41 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Fri, 19 Apr 2024 20:51:36 +0200
Am Freitag, dem 12.04.2024 um 17:26 +0000 schrieb Dariqq: > The screencast service can now find typelibs and gstreamer plugins. > > * gnu/packages/linux.scm (gnome-shell) > [inputs]: Add gst-plugins-good and pipewire. > [#:phases]<'wrap-programs>: Create a wrapper for screencast service > and use it. > > Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 > --- > > Hi, > > Here is v2 of the patch. The wrapper is now created manually as I was > unable to find a way to manipulate the gstreamer plugin load path > from within javascript. Importantly this leaves the original > javascript file untouched and therefore circumvents the argv[0] > problem in v1. > All the required gstreamer plugins (pipewire and gst-plugins-good) > are now inputs and are in the wrapper via GST_PLUGIN_SYSTEM_PATH. I'm not sure this fix is sounds. It looks like it misses manual invocation from the command line, does it not? (Well, it's gnome- shell, so if you have to invoke it from the command line, things are broken, but still…) What keeps you from wrapping the environment variable in Javascript? > I've also left a comment for the required home-pipewire-service. > In gnome-shell 45+ the invocation has changed to 'gjs -m service'. > Should this also be a comment somewhere? Gnome-shell 45+ is currently irrelevant, but we might have to adapt things once we get there on gnome-team. We do need a better gjs- patching strategy. Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sat, 20 Apr 2024 10:13:04 GMT) Full text and rfc822 format available.Message #44 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Sat, 20 Apr 2024 10:11:43 +0000
On 19.04.24 20:51, Liliana Marie Prikler wrote: > Am Freitag, dem 12.04.2024 um 17:26 +0000 schrieb Dariqq: >> The screencast service can now find typelibs and gstreamer plugins. >> >> * gnu/packages/linux.scm (gnome-shell) >> [inputs]: Add gst-plugins-good and pipewire. >> [#:phases]<'wrap-programs>: Create a wrapper for screencast service >> and use it. >> >> Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 >> --- >> >> Hi, >> >> Here is v2 of the patch. The wrapper is now created manually as I was >> unable to find a way to manipulate the gstreamer plugin load path >> from within javascript. Importantly this leaves the original >> javascript file untouched and therefore circumvents the argv[0] >> problem in v1. >> All the required gstreamer plugins (pipewire and gst-plugins-good) >> are now inputs and are in the wrapper via GST_PLUGIN_SYSTEM_PATH. > I'm not sure this fix is sounds. It looks like it misses manual > invocation from the command line, does it not? (Well, it's gnome- > shell, so if you have to invoke it from the command line, things are > broken, but still…) If only the typelib path is set the dbus service now longer greets you with an error but still fails to start without the gstreamer plugins. That's why in v1 I was propagating pipewire through gnome-essential-extras. I am not sure what you mean by manual invocation. The screencast service should get started via dbus. Nothing manual should be required (other than enabling the pipewire home service). What keeps you from wrapping the environment > variable in Javascript? I was unable to find a way to manipulate the GST_PLUGIN_PATH or specify the gst search path from within javascript. There is Gst.Registry().scan_path but this creates a new registry and I don't think is what we want here. (but I don't know anything about gstreamer and javascript so I could be wrong here). I guess the most simple patch for the typelibs would be something like diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index fa6c566c75..28c4e540a6 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9404,13 +9404,15 @@ (define-public gnome-shell (wrap-program (string-append #$output "/bin/" prog) `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) '("gnome-shell" "gnome-extensions-app")) - (substitute* (string-append #$output "/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) + (substitute* (string-append #$output "/share/gnome-shell/" prog) + (("imports\\.package\\.start" all) + (string-append "'" gi-typelib-path "'.split(':').forEach(" + "path => imports.gi.GIRepository.Repository." + "prepend_search_path(path));\n" + all)))) + '("org.gnome.Shell.Extensions" "org.gnome.Shell.Screencast")) (for-each (lambda (prog) (wrap-program (string-append #$output "/bin/" prog) and dealing with the gstreamer plugins in another way. >> I've also left a comment for the required home-pipewire-service. >> In gnome-shell 45+ the invocation has changed to 'gjs -m service'. >> Should this also be a comment somewhere? > Gnome-shell 45+ is currently irrelevant, but we might have to adapt > things once we get there on gnome-team. We do need a better gjs- > patching strategy. > It would be nice if something like wrap-script would work. But the problem is that the dbus services specify somehting like "Exec= gjs service" rather than executing a gjs-script directly. (which is the main purpose of the patch from nixos). And also gjs not being a valid interpreter for wrap-script (Changing that will rebuild everything) > Cheers > Have an nice day.
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sat, 20 Apr 2024 10:47:03 GMT) Full text and rfc822 format available.Message #47 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Sat, 20 Apr 2024 12:46:25 +0200
Am Samstag, dem 20.04.2024 um 10:11 +0000 schrieb Dariqq: > > > On 19.04.24 20:51, Liliana Marie Prikler wrote: > > Am Freitag, dem 12.04.2024 um 17:26 +0000 schrieb Dariqq: > > > The screencast service can now find typelibs and gstreamer > > > plugins. > > > > > > * gnu/packages/linux.scm (gnome-shell) > > > [inputs]: Add gst-plugins-good and pipewire. > > > [#:phases]<'wrap-programs>: Create a wrapper for screencast > > > service > > > and use it. > > > > > > Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 > > > --- > > > > > > Hi, > > > > > > Here is v2 of the patch. The wrapper is now created manually as I > > > was unable to find a way to manipulate the gstreamer plugin load > > > path from within javascript. Importantly this leaves the original > > > javascript file untouched and therefore circumvents the argv[0] > > > problem in v1. > > > All the required gstreamer plugins (pipewire and gst-plugins- > > > good) are now inputs and are in the wrapper via > > > GST_PLUGIN_SYSTEM_PATH. > > I'm not sure this fix is sounds. It looks like it misses manual > > invocation from the command line, does it not? (Well, it's gnome- > > shell, so if you have to invoke it from the command line, things > > are broken, but still…) > > If only the typelib path is set the dbus service now longer greets > you with an error but still fails to start without the gstreamer > plugins. That's why in v1 I was propagating pipewire through > gnome-essential-extras. > > I am not sure what you mean by manual invocation. The screencast > service should get started via dbus. Nothing manual should be > required (other than enabling the pipewire home service). Just what it says on the tin, manually running the "binary" through the command line. It's not super useful with GNOME, but I think we should make sure our services work whichever way they could be invoked. > What keeps you from wrapping the environment > > variable in Javascript? > > I was unable to find a way to manipulate the GST_PLUGIN_PATH or > specify the gst search path from within javascript. There is > Gst.Registry().scan_path but this creates a new registry and I don't > think is what we want here. (but I don't know anything about > gstreamer and javascript so I could be wrong here). Instead of creating a new Gst.Registry – as per the () here – you could use gst_registry_get() or whatever the according JS method is to access the Registry singleton. The Registry constructor ought to be protected, but idk how GJS handles that. > I guess the most simple patch for the typelibs would be something > like > > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index fa6c566c75..28c4e540a6 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -9404,13 +9404,15 @@ (define-public gnome-shell > (wrap-program (string-append #$output "/bin/" > prog) > `("GI_TYPELIB_PATH" ":" prefix > (,gi-typelib-path)))) > '("gnome-shell" "gnome-extensions-app")) > - (substitute* (string-append #$output > "/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) > + (substitute* (string-append #$output > "/share/gnome-shell/" prog) > + (("imports\\.package\\.start" all) > + (string-append "'" gi-typelib-path > "'.split(':').forEach(" > + "path => > imports.gi.GIRepository.Repository." > + > "prepend_search_path(path));\n" > + all)))) > + '("org.gnome.Shell.Extensions" > "org.gnome.Shell.Screencast")) > (for-each > (lambda (prog) > (wrap-program (string-append #$output "/bin/" > prog) > > > and dealing with the gstreamer plugins in another way. Hmm, could you add --gst-plugin-path on the command line? > > > I've also left a comment for the required home-pipewire-service. > > > In gnome-shell 45+ the invocation has changed to 'gjs -m > > > service'. > > > Should this also be a comment somewhere? > > Gnome-shell 45+ is currently irrelevant, but we might have to adapt > > things once we get there on gnome-team. We do need a better gjs- > > patching strategy. > > > > It would be nice if something like wrap-script would work. But the > problem is that the dbus services specify somehting like "Exec= gjs > service" rather than executing a gjs-script directly. (which is the > main purpose of the patch from nixos). And also gjs not being a valid > interpreter for wrap-script (Changing that will rebuild everything) You can redo the needed logic locally and add a "XXX: Use wrap-script once it can handle gjs" for example. That's no hard blocker, but it's not the nicest option either, I admit. Let's try our other options first. > Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sun, 21 Apr 2024 12:39:02 GMT) Full text and rfc822 format available.Message #50 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Sun, 21 Apr 2024 12:37:46 +0000
On 20.04.24 12:46, Liliana Marie Prikler wrote: > Am Samstag, dem 20.04.2024 um 10:11 +0000 schrieb Dariqq: >> >> >> On 19.04.24 20:51, Liliana Marie Prikler wrote: >>> Am Freitag, dem 12.04.2024 um 17:26 +0000 schrieb Dariqq: >>>> The screencast service can now find typelibs and gstreamer >>>> plugins. >>>> >>>> * gnu/packages/linux.scm (gnome-shell) >>>> [inputs]: Add gst-plugins-good and pipewire. >>>> [#:phases]<'wrap-programs>: Create a wrapper for screencast >>>> service >>>> and use it. >>>> >>>> Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 >>>> --- >>>> >>>> Hi, >>>> >>>> Here is v2 of the patch. The wrapper is now created manually as I >>>> was unable to find a way to manipulate the gstreamer plugin load >>>> path from within javascript. Importantly this leaves the original >>>> javascript file untouched and therefore circumvents the argv[0] >>>> problem in v1. >>>> All the required gstreamer plugins (pipewire and gst-plugins- >>>> good) are now inputs and are in the wrapper via >>>> GST_PLUGIN_SYSTEM_PATH. >>> I'm not sure this fix is sounds. It looks like it misses manual >>> invocation from the command line, does it not? (Well, it's gnome- >>> shell, so if you have to invoke it from the command line, things >>> are broken, but still…) >> >> If only the typelib path is set the dbus service now longer greets >> you with an error but still fails to start without the gstreamer >> plugins. That's why in v1 I was propagating pipewire through >> gnome-essential-extras. >> >> I am not sure what you mean by manual invocation. The screencast >> service should get started via dbus. Nothing manual should be >> required (other than enabling the pipewire home service). > Just what it says on the tin, manually running the "binary" through the > command line. It's not super useful with GNOME, but I think we should > make sure our services work whichever way they could be invoked. > >> What keeps you from wrapping the environment >>> variable in Javascript? >> >> I was unable to find a way to manipulate the GST_PLUGIN_PATH or >> specify the gst search path from within javascript. There is >> Gst.Registry().scan_path but this creates a new registry and I don't >> think is what we want here. (but I don't know anything about >> gstreamer and javascript so I could be wrong here). > Instead of creating a new Gst.Registry – as per the () here – you could > use gst_registry_get() or whatever the according JS method is to access > the Registry singleton. > > The Registry constructor ought to be protected, but idk how GJS handles > that. > I've tried adding Gst.Registry.get().scan_path() after the GI_TYPELIB expansion but I am not sure why it does not work. Stracing the invocation shows that the pipewire gstreamer plugin is accessed at the beginning but it is still not available somehow. Probably because of my lack of knowledge about gstreamer. >> I guess the most simple patch for the typelibs would be something >> like >> >> >> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm >> index fa6c566c75..28c4e540a6 100644 >> --- a/gnu/packages/gnome.scm >> +++ b/gnu/packages/gnome.scm >> @@ -9404,13 +9404,15 @@ (define-public gnome-shell >> (wrap-program (string-append #$output "/bin/" >> prog) >> `("GI_TYPELIB_PATH" ":" prefix >> (,gi-typelib-path)))) >> '("gnome-shell" "gnome-extensions-app")) >> - (substitute* (string-append #$output >> "/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) >> + (substitute* (string-append #$output >> "/share/gnome-shell/" prog) >> + (("imports\\.package\\.start" all) >> + (string-append "'" gi-typelib-path >> "'.split(':').forEach(" >> + "path => >> imports.gi.GIRepository.Repository." >> + >> "prepend_search_path(path));\n" >> + all)))) >> + '("org.gnome.Shell.Extensions" >> "org.gnome.Shell.Screencast")) >> (for-each >> (lambda (prog) >> (wrap-program (string-append #$output "/bin/" >> prog) >> >> >> and dealing with the gstreamer plugins in another way. > Hmm, could you add --gst-plugin-path on the command line? > >>>> I've also left a comment for the required home-pipewire-service. >>>> In gnome-shell 45+ the invocation has changed to 'gjs -m >>>> service'. >>>> Should this also be a comment somewhere? >>> Gnome-shell 45+ is currently irrelevant, but we might have to adapt >>> things once we get there on gnome-team. We do need a better gjs- >>> patching strategy. >>> >> >> It would be nice if something like wrap-script would work. But the >> problem is that the dbus services specify somehting like "Exec= gjs >> service" rather than executing a gjs-script directly. (which is the >> main purpose of the patch from nixos). And also gjs not being a valid >> interpreter for wrap-script (Changing that will rebuild everything) > You can redo the needed logic locally and add a "XXX: Use wrap-script > once it can handle gjs" for example. That's no hard blocker, but it's > not the nicest option either, I admit. Let's try our other options > first. > I've just found GLib.setenv() to set environment variables for the process directly from within gjs. The GLib typelib comes from the gobject-introspection package so this should be available. From my limited testing it seems to work (at least for the screencast service). What do you think? > Cheers Have a nice day.
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sun, 21 Apr 2024 12:44:02 GMT) Full text and rfc822 format available.Message #53 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. Date: Sun, 21 Apr 2024 14:43:13 +0200
Am Sonntag, dem 21.04.2024 um 12:37 +0000 schrieb Dariqq: > > > [...] > I've just found GLib.setenv() to set environment variables for the > process directly from within gjs. The GLib typelib comes from the > gobject-introspection package so this should be available. > > From my limited testing it seems to work (at least for the screencast > service). What do you think? Yes, GLib.setenv is the function I had in mind to twiddle the environment. If you find the right location to do so at the start of the program, please send a patch that does that. Cheers
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sun, 21 Apr 2024 17:11:04 GMT) Full text and rfc822 format available.Message #56 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: 70282 <at> debbugs.gnu.org Cc: Dariqq <dariqq <at> posteo.net> Subject: [PATCH v3] gnu: gnome-shell: Wrap screencast service. Date: Sun, 21 Apr 2024 17:02:18 +0000
Adjust screencast such that GI_TYPELIB_PATH and GST_PLUGIN_SYSTEM_PATH are set before starting. Add all required gstreamer plugins to inputs. To be able to use it a running pipewire service is needed. * gnu/packages/gnome.scm (gnome-shell): [inputs]: Add gst-plugins-good and pipewire. [#:phases]<'wrap-programs>: Wrap org.gnome.Shell.Screencast. Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 --- Here is v3 which only uses js to set the environment variables. Slight difference to before is that GST_PLUGIN_SYSTEM_PATH gets set to specific paths rather than prepending. I've also tested if GI_TYPELIB_PATH can be set with GLib.setenv but that didn't seem to work, so I 've used something similiar as in other places. gnu/packages/gnome.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 489f23865b..b3c3fb72ad 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9392,6 +9392,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) @@ -9411,6 +9412,18 @@ (define-public gnome-shell "path => imports.gi.GIRepository.Repository." "prepend_search_path(path));\n" all))) + ;; Screencast requires a pipewire service running + ;; (i.e. as provided by home-pipewire-service-type) + (substitute* (string-append #$output "/share/gnome-shell/" + "org.gnome.Shell.Screencast") + (("imports\\.package\\.start" all) + (string-append "'" gi-typelib-path "'.split(':').forEach(" + "path => imports.gi.GIRepository.Repository." + "prepend_search_path(path));\n" + "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," + "'" gst-plugin-path "'" + ", true);\n" + all))) (for-each (lambda (prog) (wrap-program (string-append #$output "/bin/" prog) @@ -9476,6 +9489,7 @@ (define-public gnome-shell gnome-settings-daemon graphene gst-plugins-base + gst-plugins-good ibus libcanberra libcroco @@ -9486,6 +9500,7 @@ (define-public gnome-shell mesa-headers mutter network-manager-applet + pipewire polkit pulseaudio python-pygobject base-commit: a1d711c92e119f6b5b8e99a620cdba92a4ca3bfb -- 2.41.0
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 12:59:01 GMT) Full text and rfc822 format available.Message #59 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v3] gnu: gnome-shell: Wrap screencast service. Date: Wed, 8 May 2024 12:57:43 +0000
Hi Liliana, Were you able to take a look at v3 yet? I've sent it a couple of weeks ago utilizing Glib.setenv to set the gst plugin path. Have a nice day. On 21.04.24 14:43, Liliana Marie Prikler wrote: > Am Sonntag, dem 21.04.2024 um 12:37 +0000 schrieb Dariqq: >>> >> [...] >> I've just found GLib.setenv() to set environment variables for the >> process directly from within gjs. The GLib typelib comes from the >> gobject-introspection package so this should be available. >> >> From my limited testing it seems to work (at least for the screencast >> service). What do you think? > Yes, GLib.setenv is the function I had in mind to twiddle the > environment. If you find the right location to do so at the start of > the program, please send a patch that does that. > > Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 17:26:02 GMT) Full text and rfc822 format available.Message #62 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, 70282 <at> debbugs.gnu.org Cc: Vivien Kraus <vivien <at> planete-kraus.eu>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: Re: [bug#70282] [PATCH v3] gnu: gnome-shell: Wrap screencast service. Date: Wed, 08 May 2024 19:24:26 +0200
Am Sonntag, dem 21.04.2024 um 17:02 +0000 schrieb Dariqq: > Adjust screencast such that GI_TYPELIB_PATH and > GST_PLUGIN_SYSTEM_PATH are set > before starting. > > Add all required gstreamer plugins to inputs. > > To be able to use it a running pipewire service is needed. > > * gnu/packages/gnome.scm (gnome-shell): > [inputs]: Add gst-plugins-good and pipewire. > [#:phases]<'wrap-programs>: Wrap org.gnome.Shell.Screencast. > > Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 > --- > > Here is v3 which only uses js to set the environment variables. > Slight difference to before is that GST_PLUGIN_SYSTEM_PATH gets set > to specific paths rather than prepending. > I've also tested if GI_TYPELIB_PATH can be set with GLib.setenv but > that didn't seem to work, > so I 've used something similiar as in other places. > > gnu/packages/gnome.scm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 489f23865b..b3c3fb72ad 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -9392,6 +9392,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) > @@ -9411,6 +9412,18 @@ (define-public gnome-shell > "path => > imports.gi.GIRepository.Repository." > "prepend_search_path(path));\n" > all))) > + ;; Screencast requires a pipewire service running > + ;; (i.e. as provided by home-pipewire-service- > type) > + (substitute* (string-append #$output > "/share/gnome-shell/" > + > "org.gnome.Shell.Screencast") > + (("imports\\.package\\.start" all) > + (string-append "'" gi-typelib-path > "'.split(':').forEach(" > + "path => > imports.gi.GIRepository.Repository." > + "prepend_search_path(path));\n" > + > "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," > + "'" gst-plugin-path "'" > + ", true);\n" > + all))) Sorry for the late reply. You ought to use GLib.getenv to get the current value, so that you can add the needed paths as a prefix (or suffix? I'd personally prefer letting the user prefix them). Cheers
liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, vivien <at> planete-kraus.eu, guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 18:42:01 GMT) Full text and rfc822 format available.Message #65 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: 70282 <at> debbugs.gnu.org Cc: Dariqq <dariqq <at> posteo.net> Subject: [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Wed, 8 May 2024 18:33:30 +0000
Adjust screencast such that GI_TYPELIB_PATH and GST_PLUGIN_SYSTEM_PATH are set before starting. Add all required gstreamer plugins to inputs. To be able to use it a running pipewire service is needed. * gnu/packages/gnome.scm (gnome-shell): [inputs]: Add gst-plugins-good and pipewire. [#:phases]<'wrap-programs>: Wrap org.gnome.Shell.Screencast. Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 --- Here is v4 which appends the gstreamer plugins to GST_PLUGIN_SYSTEM_PATH, handling the case when getenv returns null. I think the difference between appendending or prepending in this case is not too important as the user GST_PLUGIN_PATH should take precedent. The more important thing is that the plugins are in any plugin path at all. gnu/packages/gnome.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 92e35e3c5a..4bbff2a89b 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9408,6 +9408,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) @@ -9427,6 +9428,19 @@ (define-public gnome-shell "path => imports.gi.GIRepository.Repository." "prepend_search_path(path));\n" all))) + ;; Screencast requires a pipewire service running + ;; (i.e. as provided by home-pipewire-service-type) + (substitute* (string-append #$output "/share/gnome-shell/" + "org.gnome.Shell.Screencast") + (("imports\\.package\\.start" all) + (string-append "'" gi-typelib-path "'.split(':').forEach(" + "path => imports.gi.GIRepository.Repository." + "prepend_search_path(path));\n" + "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," + "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH')," + "'" gst-plugin-path "'].filter(v => v).join(':')," + "true);\n" + all))) (for-each (lambda (prog) (wrap-program (string-append #$output "/bin/" prog) @@ -9492,6 +9506,7 @@ (define-public gnome-shell gnome-settings-daemon graphene gst-plugins-base + gst-plugins-good ibus libcanberra libcroco @@ -9502,6 +9517,7 @@ (define-public gnome-shell mesa-headers mutter network-manager-applet + pipewire polkit pulseaudio python-pygobject base-commit: 7b7f299bb493e485c5534b8c554e51d4f3a8c026 -- 2.41.0
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 19:53:01 GMT) Full text and rfc822 format available.Message #68 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Dariqq <dariqq <at> posteo.net> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu>, Liliana Marie Prikler <liliana.prikler <at> gmail.com> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Wed, 08 May 2024 15:51:26 -0400
Hi Dariqq, Dariqq <dariqq <at> posteo.net> writes: > Adjust screencast such that GI_TYPELIB_PATH and GST_PLUGIN_SYSTEM_PATH are set > before starting. > > Add all required gstreamer plugins to inputs. > > To be able to use it a running pipewire service is needed. > > * gnu/packages/gnome.scm (gnome-shell): > [inputs]: Add gst-plugins-good and pipewire. > [#:phases]<'wrap-programs>: Wrap org.gnome.Shell.Screencast. Thanks for your efforts improving our GNOME desktop experience! > Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 > --- > Here is v4 which appends the gstreamer plugins to > GST_PLUGIN_SYSTEM_PATH, handling the case when getenv returns null. I > think the difference between appendending or prepending in this case > is not too important as the user GST_PLUGIN_PATH should take > precedent. The more important thing is that the plugins are in any > plugin path at all. > > gnu/packages/gnome.scm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 92e35e3c5a..4bbff2a89b 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -9408,6 +9408,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) > @@ -9427,6 +9428,19 @@ (define-public gnome-shell > "path => imports.gi.GIRepository.Repository." > "prepend_search_path(path));\n" > all))) > + ;; Screencast requires a pipewire service running > + ;; (i.e. as provided by home-pipewire-service-type) > + (substitute* (string-append #$output "/share/gnome-shell/" > + "org.gnome.Shell.Screencast") > + (("imports\\.package\\.start" all) > + (string-append "'" gi-typelib-path "'.split(':').forEach(" > + "path => imports.gi.GIRepository.Repository." > + "prepend_search_path(path));\n" > + "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," > + "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH')," > + "'" gst-plugin-path "'].filter(v => v).join(':')," > + "true);\n" > + all))) Perhaps a simple patch would convey the change better and be easier to maintain in the future / be readily available for other distributions to use. > (for-each > (lambda (prog) > (wrap-program (string-append #$output "/bin/" prog) > @@ -9492,6 +9506,7 @@ (define-public gnome-shell > gnome-settings-daemon > graphene > gst-plugins-base > + gst-plugins-good > ibus > libcanberra > libcroco > @@ -9502,6 +9517,7 @@ (define-public gnome-shell > mesa-headers > mutter > network-manager-applet > + pipewire > polkit > pulseaudio > python-pygobject Otherwise, LGTM! -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 21:19:01 GMT) Full text and rfc822 format available.Message #71 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu>, Liliana Marie Prikler <liliana.prikler <at> gmail.com> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Wed, 8 May 2024 21:18:04 +0000
Hi Maxim, On 08.05.24 21:51, Maxim Cournoyer wrote: > Hi Dariqq, > > Dariqq <dariqq <at> posteo.net> writes: > >> Adjust screencast such that GI_TYPELIB_PATH and GST_PLUGIN_SYSTEM_PATH are set >> before starting. >> >> Add all required gstreamer plugins to inputs. >> >> To be able to use it a running pipewire service is needed. >> >> * gnu/packages/gnome.scm (gnome-shell): >> [inputs]: Add gst-plugins-good and pipewire. >> [#:phases]<'wrap-programs>: Wrap org.gnome.Shell.Screencast. > > Thanks for your efforts improving our GNOME desktop experience! > The slight annoyance with this is that if pipewire is not running the option to enable the screen recorder is there but it will stop immediately. But at least searching online for this problem has some mentions of pipewire and i added a comment in the pacakge aswell. I think it is definitly a better solution than not knowing that the option is even there as the button does not get displayed at all if the service fails to start. >> Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 >> --- >> Here is v4 which appends the gstreamer plugins to >> GST_PLUGIN_SYSTEM_PATH, handling the case when getenv returns null. I >> think the difference between appendending or prepending in this case >> is not too important as the user GST_PLUGIN_PATH should take >> precedent. The more important thing is that the plugins are in any >> plugin path at all. >> >> gnu/packages/gnome.scm | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm >> index 92e35e3c5a..4bbff2a89b 100644 >> --- a/gnu/packages/gnome.scm >> +++ b/gnu/packages/gnome.scm >> @@ -9408,6 +9408,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) >> @@ -9427,6 +9428,19 @@ (define-public gnome-shell >> "path => imports.gi.GIRepository.Repository." >> "prepend_search_path(path));\n" >> all))) >> + ;; Screencast requires a pipewire service running >> + ;; (i.e. as provided by home-pipewire-service-type) >> + (substitute* (string-append #$output "/share/gnome-shell/" >> + "org.gnome.Shell.Screencast") >> + (("imports\\.package\\.start" all) >> + (string-append "'" gi-typelib-path "'.split(':').forEach(" >> + "path => imports.gi.GIRepository.Repository." >> + "prepend_search_path(path));\n" >> + "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," >> + "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH')," >> + "'" gst-plugin-path "'].filter(v => v).join(':')," >> + "true);\n" >> + all))) > > Perhaps a simple patch would convey the change better and be easier to > maintain in the future / be readily available for other distributions to > use. The simple patch that would do this is basically the patch from nixos in v1 of this which adds a shebang line for gjs to the service invocation files (rather than the dbus service invoking $gjs $service). The problem then is that wrap-program changes the filename to * .real which makes gjs unhappy. The people from nix circumvent this by using some js at the beginning to reset the entrypoint to the correct value. One nice way around avoiding the problem would be using wrap-script instead though that does not support gjs as interpreter (yet?) and adding that forces a rebuild of all packages due to (guix build utils) changing. Maybe another comment, similiar to the one Liliana suggested earlier in this thread, could be added at the beginning to inform about changing to wrap script + patch instead once that is a viable option? > >> (for-each >> (lambda (prog) >> (wrap-program (string-append #$output "/bin/" prog) >> @@ -9492,6 +9506,7 @@ (define-public gnome-shell >> gnome-settings-daemon >> graphene >> gst-plugins-base >> + gst-plugins-good >> ibus >> libcanberra >> libcroco >> @@ -9502,6 +9517,7 @@ (define-public gnome-shell >> mesa-headers >> mutter >> network-manager-applet >> + pipewire >> polkit >> pulseaudio >> python-pygobject > > Otherwise, LGTM! > Have a nice day
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Wed, 08 May 2024 22:12:02 GMT) Full text and rfc822 format available.Message #74 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Thu, 09 May 2024 00:11:18 +0200
Hi Dariqq, Am Mittwoch, dem 08.05.2024 um 21:18 +0000 schrieb Dariqq: > [...] > > On 08.05.24 21:51, Maxim Cournoyer wrote: > > > [...] > > Perhaps a simple patch would convey the change better and be easier > > to > > maintain in the future / be readily available for other > > distributions to > > use. > > The simple patch that would do this is basically the patch from nixos > in v1 of this which adds a shebang line for gjs to the service > invocation files (rather than the dbus service invoking $gjs > $service). The problem then is that wrap-program changes the filename > to * .real which makes gjs unhappy. > > [...] > Maybe another comment, similiar to the one Liliana suggested earlier > in this thread, could be added at the beginning to inform about > changing to wrap script + patch instead once that is a viable option? The pattern we typically use is to add an autotools-style "variable", e.g. @GNOME_SHELL_GST_PLUGIN_SYSTEM_PATH@ through a patch, then use substitute* to fill it in. I don't think it's a requirement, but since Maxim suggested, it'd definitely be nice to have. Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Thu, 09 May 2024 08:29:02 GMT) Full text and rfc822 format available.Message #77 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Thu, 9 May 2024 08:27:37 +0000
Hi Liliana, On 09.05.24 00:11, Liliana Marie Prikler wrote: > Hi Dariqq, > > Am Mittwoch, dem 08.05.2024 um 21:18 +0000 schrieb Dariqq: >> [...] >> >> On 08.05.24 21:51, Maxim Cournoyer wrote: >> >>> [...] >>> Perhaps a simple patch would convey the change better and be easier >>> to >>> maintain in the future / be readily available for other >>> distributions to >>> use. >> >> The simple patch that would do this is basically the patch from nixos >> in v1 of this which adds a shebang line for gjs to the service >> invocation files (rather than the dbus service invoking $gjs >> $service). The problem then is that wrap-program changes the filename >> to * .real which makes gjs unhappy. >> >> [...] >> Maybe another comment, similiar to the one Liliana suggested earlier >> in this thread, could be added at the beginning to inform about >> changing to wrap script + patch instead once that is a viable option? > The pattern we typically use is to add an autotools-style "variable", > e.g. @GNOME_SHELL_GST_PLUGIN_SYSTEM_PATH@ through a patch, then use > substitute* to fill it in. I don't think it's a requirement, but since > Maxim suggested, it'd definitely be nice to have. How would this work in this case for gnomeshell? Put the js that gets concatenated here into the actual file with a patch adding placeholder variables for GST Plugin path and gi typelib path and replace later? As these js files get generated from a common template for each service this would require substituting all of them and not only the screencast service. > > Cheers >
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Thu, 09 May 2024 15:31:01 GMT) Full text and rfc822 format available.Message #80 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Dariqq <dariqq <at> posteo.net> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu>, Liliana Marie Prikler <liliana.prikler <at> gmail.com> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Thu, 09 May 2024 11:30:21 -0400
Hi Dariqq, Dariqq <dariqq <at> posteo.net> writes: [...] >>> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm >>> index 92e35e3c5a..4bbff2a89b 100644 >>> --- a/gnu/packages/gnome.scm >>> +++ b/gnu/packages/gnome.scm >>> @@ -9408,6 +9408,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) >>> @@ -9427,6 +9428,19 @@ (define-public gnome-shell >>> "path => imports.gi.GIRepository.Repository." >>> "prepend_search_path(path));\n" >>> all))) >>> + ;; Screencast requires a pipewire service running >>> + ;; (i.e. as provided by home-pipewire-service-type) >>> + (substitute* (string-append #$output "/share/gnome-shell/" >>> + "org.gnome.Shell.Screencast") >>> + (("imports\\.package\\.start" all) >>> + (string-append "'" gi-typelib-path "'.split(':').forEach(" >>> + "path => imports.gi.GIRepository.Repository." >>> + "prepend_search_path(path));\n" >>> + "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," >>> + "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH')," >>> + "'" gst-plugin-path "'].filter(v => v).join(':')," >>> + "true);\n" >>> + all))) >> Perhaps a simple patch would convey the change better and be easier >> to >> maintain in the future / be readily available for other distributions to >> use. > > > The simple patch that would do this is basically the patch from nixos > in v1 of this which adds a shebang line for gjs to the service > invocation files (rather than the dbus service invoking $gjs > $service). The problem then is that wrap-program changes the filename > to * .real which makes gjs unhappy. > > The people from nix circumvent this by using some js at the beginning > to reset the entrypoint to the correct value. > > One nice way around avoiding the problem would be using wrap-script > instead though that does not support gjs as interpreter (yet?) and > adding that forces a rebuild of all packages due to (guix build utils) > changing. It'd be nice to prep such support on core-updates. You can test it on master by having a (guix build utils-next) module that you explicitly use. > Maybe another comment, similiar to the one Liliana suggested earlier > in this thread, could be added at the beginning to inform about > changing to wrap script + patch instead once that is a viable option? That could be a good reminder to have, yes. -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Fri, 10 May 2024 15:00:02 GMT) Full text and rfc822 format available.Message #83 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Fri, 10 May 2024 14:59:40 +0000
Hi Liliana and Maxim, On 09.05.24 00:11, Liliana Marie Prikler wrote: > Hi Dariqq, > > Am Mittwoch, dem 08.05.2024 um 21:18 +0000 schrieb Dariqq: >> [...] >> >> On 08.05.24 21:51, Maxim Cournoyer wrote: >> >>> [...] >>> Perhaps a simple patch would convey the change better and be easier >>> to >>> maintain in the future / be readily available for other >>> distributions to >>> use. >> >> The simple patch that would do this is basically the patch from nixos >> in v1 of this which adds a shebang line for gjs to the service >> invocation files (rather than the dbus service invoking $gjs >> $service). The problem then is that wrap-program changes the filename >> to * .real which makes gjs unhappy. >> >> [...] >> Maybe another comment, similiar to the one Liliana suggested earlier >> in this thread, could be added at the beginning to inform about >> changing to wrap script + patch instead once that is a viable option? > The pattern we typically use is to add an autotools-style "variable", > e.g. @GNOME_SHELL_GST_PLUGIN_SYSTEM_PATH@ through a patch, then use > substitute* to fill it in. I don't think it's a requirement, but since > Maxim suggested, it'd definitely be nice to have. > Tried this today and as the js service files are created from a common template using mesons 'configure_file' method this sets all autotools-style variables unknown to meson to the empty string. Afterwardes the susbtitute* at the wrapping phase is unable to replace anything ofc. So I think I would need to either change the naming-scheme of the placeholders or substitute them into the template file before the files get configured by meson. Do you have a preference for any option (or maybe another idea)? > Cheers > Have a nice day
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Fri, 10 May 2024 16:06:02 GMT) Full text and rfc822 format available.Message #86 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Dariqq <dariqq <at> posteo.net>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Fri, 10 May 2024 18:04:21 +0200
Am Freitag, dem 10.05.2024 um 14:59 +0000 schrieb Dariqq: > Hi Liliana and Maxim, > > On 09.05.24 00:11, Liliana Marie Prikler wrote: > > Hi Dariqq, > > > > Am Mittwoch, dem 08.05.2024 um 21:18 +0000 schrieb Dariqq: > > > [...] > > > > > > On 08.05.24 21:51, Maxim Cournoyer wrote: > > > > > > > [...] > > > > Perhaps a simple patch would convey the change better and be > > > > easier > > > > to > > > > maintain in the future / be readily available for other > > > > distributions to > > > > use. > > > > > > The simple patch that would do this is basically the patch from > > > nixos > > > in v1 of this which adds a shebang line for gjs to the service > > > invocation files (rather than the dbus service invoking $gjs > > > $service). The problem then is that wrap-program changes the > > > filename > > > to * .real which makes gjs unhappy. > > > > > > [...] > > > Maybe another comment, similiar to the one Liliana suggested > > > earlier > > > in this thread, could be added at the beginning to inform about > > > changing to wrap script + patch instead once that is a viable > > > option? > > The pattern we typically use is to add an autotools-style > > "variable", > > e.g. @GNOME_SHELL_GST_PLUGIN_SYSTEM_PATH@ through a patch, then use > > substitute* to fill it in. I don't think it's a requirement, but > > since > > Maxim suggested, it'd definitely be nice to have. > > > > Tried this today and as the js service files are created from a > common template using mesons 'configure_file' method this sets all > autotools-style variables unknown to meson to the empty string. > Afterwardes the susbtitute* at the wrapping phase is unable to > replace anything ofc. > > So I think I would need to either change the naming-scheme of the > placeholders or substitute them into the template file before the > files get configured by meson. Or you add an option to meson_options.txt to fill it in, so that you can provide the right value via #:configure-flags Cheers
guix-patches <at> gnu.org
:bug#70282
; Package guix-patches
.
(Sat, 11 May 2024 08:05:01 GMT) Full text and rfc822 format available.Message #89 received at 70282 <at> debbugs.gnu.org (full text, mbox):
From: Dariqq <dariqq <at> posteo.net> To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 70282 <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Sat, 11 May 2024 08:03:57 +0000
On 10.05.24 18:04, Liliana Marie Prikler wrote: > Am Freitag, dem 10.05.2024 um 14:59 +0000 schrieb Dariqq: >> Hi Liliana and Maxim, >> >> On 09.05.24 00:11, Liliana Marie Prikler wrote: >>> Hi Dariqq, >>> >>> Am Mittwoch, dem 08.05.2024 um 21:18 +0000 schrieb Dariqq: >>>> [...] >>>> >>>> On 08.05.24 21:51, Maxim Cournoyer wrote: >>>> >>>>> [...] >>>>> Perhaps a simple patch would convey the change better and be >>>>> easier >>>>> to >>>>> maintain in the future / be readily available for other >>>>> distributions to >>>>> use. >>>> >>>> The simple patch that would do this is basically the patch from >>>> nixos >>>> in v1 of this which adds a shebang line for gjs to the service >>>> invocation files (rather than the dbus service invoking $gjs >>>> $service). The problem then is that wrap-program changes the >>>> filename >>>> to * .real which makes gjs unhappy. >>>> >>>> [...] >>>> Maybe another comment, similiar to the one Liliana suggested >>>> earlier >>>> in this thread, could be added at the beginning to inform about >>>> changing to wrap script + patch instead once that is a viable >>>> option? >>> The pattern we typically use is to add an autotools-style >>> "variable", >>> e.g. @GNOME_SHELL_GST_PLUGIN_SYSTEM_PATH@ through a patch, then use >>> substitute* to fill it in. I don't think it's a requirement, but >>> since >>> Maxim suggested, it'd definitely be nice to have. >>> >> >> Tried this today and as the js service files are created from a >> common template using mesons 'configure_file' method this sets all >> autotools-style variables unknown to meson to the empty string. >> Afterwardes the susbtitute* at the wrapping phase is unable to >> replace anything ofc. >> >> So I think I would need to either change the naming-scheme of the >> placeholders or substitute them into the template file before the >> files get configured by meson. > Or you add an option to meson_options.txt to fill it in, so that you > can provide the right value via #:configure-flags I'd want to avoid putting the environement variables together myself and rather use getenv to retrieve the value at build time though. Don't think that would work with #:configure-flags > > Cheers Have a nice day
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:Dariqq <dariqq <at> posteo.net>
:Message #94 received at 70282-done <at> debbugs.gnu.org (full text, mbox):
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Dariqq <dariqq <at> posteo.net> Cc: 70282-done <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu> Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service. Date: Tue, 14 May 2024 07:34:58 +0200
Am Donnerstag, dem 09.05.2024 um 11:30 -0400 schrieb Maxim Cournoyer: > Hi Dariqq, > > Dariqq <dariqq <at> posteo.net> writes: > > [...] > > > > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > > > > index 92e35e3c5a..4bbff2a89b 100644 > > > > --- a/gnu/packages/gnome.scm > > > > +++ b/gnu/packages/gnome.scm > > > > @@ -9408,6 +9408,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) > > > > @@ -9427,6 +9428,19 @@ (define-public gnome-shell > > > > "path => > > > > imports.gi.GIRepository.Repository." > > > > > > > > "prepend_search_path(path));\n" > > > > all))) > > > > + ;; Screencast requires a pipewire service > > > > running > > > > + ;; (i.e. as provided by home-pipewire- > > > > service-type) > > > > + (substitute* (string-append #$output > > > > "/share/gnome-shell/" > > > > + > > > > "org.gnome.Shell.Screencast") > > > > + (("imports\\.package\\.start" all) > > > > + (string-append "'" gi-typelib-path > > > > "'.split(':').forEach(" > > > > + "path => > > > > imports.gi.GIRepository.Repository." > > > > + > > > > "prepend_search_path(path));\n" > > > > + > > > > "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH'," > > > > + > > > > "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH')," > > > > + "'" gst-plugin-path > > > > "'].filter(v => v).join(':')," > > > > + "true);\n" > > > > + all))) > > > Perhaps a simple patch would convey the change better and be > > > easier to maintain in the future / be readily available for other > > > distributions to use. > > > > > > The simple patch that would do this is basically the patch from > > nixos in v1 of this which adds a shebang line for gjs to the > > service invocation files (rather than the dbus service invoking > > $gjs $service). The problem then is that wrap-program changes the > > filename to * .real which makes gjs unhappy. > > > > The people from nix circumvent this by using some js at the > > beginning to reset the entrypoint to the correct value. > > > > One nice way around avoiding the problem would be using wrap-script > > instead though that does not support gjs as interpreter (yet?) and > > adding that forces a rebuild of all packages due to (guix build > > utils) changing. > > It'd be nice to prep such support on core-updates. You can test it > on master by having a (guix build utils-next) module that you > explicitly use. > > > Maybe another comment, similiar to the one Liliana suggested > > earlier in this thread, could be added at the beginning to inform > > about changing to wrap script + patch instead once that is a viable > > option? > > That could be a good reminder to have, yes. I've pushed the current version as-is, without reminder, so that we can at least mark the issue done. If someone has a good text to add, please don't hesitate to do so in post. Also don't hesitate to submit new stuff to gnome-team or core-updates after the pending merges are through. Cheers and thanks for all the hard work :)
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 12 Jun 2024 11:24:20 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.