* [bug#52492] [PATCH 1/7] gnu: pipewire-0.3: Use new input style
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-19 12:23 ` [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Mathieu Othacehe
2021-12-14 21:47 ` [bug#52492] [PATCH 2/7] gnu: pipewire-0.3: Update to 0.3.41 Josselin Poiret via Guix-patches via
` (6 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/linux.scm (pipewire-0.3): Refactor it.
---
gnu/packages/linux.scm | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c752df7996..191ab757e4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8134,15 +8134,14 @@ (define-public pipewire-0.3
(modify-phases %standard-phases
;; Skip shrink-runpath, otherwise validate-runpath fails.
(delete 'shrink-runpath))))
- (inputs
- (append (package-inputs pipewire)
- `(("avahi" ,avahi)
- ("bluez" ,bluez)
- ("jack" ,jack-2)
- ("ldacbt" ,ldacbt)
- ("pulseaudio" ,pulseaudio)
- ("vulkan-loader" ,vulkan-loader)
- ("vulkan-headers" ,vulkan-headers))))))
+ (inputs (modify-inputs (package-inputs pipewire)
+ (prepend avahi
+ bluez
+ jack-2
+ ldacbt
+ pulseaudio
+ vulkan-loader
+ vulkan-headers)))))
(define-public ell
(package
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 2/7] gnu: pipewire-0.3: Update to 0.3.41
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 1/7] gnu: pipewire-0.3: Use new input style Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 3/7] gnu: Add wireplumber Josselin Poiret via Guix-patches via
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/linux.scm (pipewire-0.3): Update it.
---
gnu/packages/linux.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 191ab757e4..77632c51c9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8114,7 +8114,7 @@ (define-public pipewire-0.3
(package
(inherit pipewire)
(name "pipewire")
- (version "0.3.40")
+ (version "0.3.41")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -8123,7 +8123,7 @@ (define-public pipewire-0.3
(file-name (git-file-name name version))
(sha256
(base32
- "1c6gni23l5w3ghwqnfs712kjj6l1825f0ib8a6r2xc1ymr0sx3kr"))))
+ "05ksl2nbn00gvdmnmffa8q8r3z29ip75554d36xchsrhqq4sxdcm"))))
(arguments
'(#:configure-flags
(list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 3/7] gnu: Add wireplumber
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 1/7] gnu: pipewire-0.3: Use new input style Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 2/7] gnu: pipewire-0.3: Update to 0.3.41 Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-19 12:24 ` [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Mathieu Othacehe
2021-12-14 21:47 ` [bug#52492] [PATCH 4/7] gnu: xdg-desktop-portal-wlr: Update to 0.5.0 Josselin Poiret via Guix-patches via
` (4 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/linux.scm (wireplumber): Add it.
---
gnu/packages/linux.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 77632c51c9..ec41a5450b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -88,6 +88,7 @@ (define-module (gnu packages linux)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages calendar)
#:use-module (gnu packages check)
#:use-module (gnu packages cpio)
@@ -8143,6 +8144,36 @@ (define-public pipewire-0.3
vulkan-loader
vulkan-headers)))))
+(define-public wireplumber
+ (package
+ (name "wireplumber")
+ (version "0.4.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://gitlab.freedesktop.org/pipewire/wireplumber.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1k56i5cardwr03vkldg68714hyksyp1vb0b315yw1bilaj2ka30i"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:configure-flags '("-Dsystemd=disabled"
+ "-Dsystem-lua=true")))
+ (native-inputs
+ `(("glib-bin" ,glib "bin")
+ ("pkg-config" ,pkg-config)))
+ (inputs (list dbus elogind glib lua pipewire-0.3))
+ (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
+ (synopsis "Session / policy manager implementation for PipeWire")
+ (description "WirePlumber is a modular session / policy manager for
+PipeWire and a GObject-based high-level library that wraps PipeWire's API,
+providing convenience for writing the daemon's modules as well as external
+tools for managing PipeWire.")
+ (license license:expat)))
+
(define-public ell
(package
(name "ell")
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 4/7] gnu: xdg-desktop-portal-wlr: Update to 0.5.0
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
` (2 preceding siblings ...)
2021-12-14 21:47 ` [bug#52492] [PATCH 3/7] gnu: Add wireplumber Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 5/7] gnu: xdg-desktop-portal-wlr: Use new input style Josselin Poiret via Guix-patches via
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Update it.
---
gnu/packages/freedesktop.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a14fba862c..a1608cbb70 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2378,7 +2378,7 @@ (define-public xdg-desktop-portal-gtk
(define-public xdg-desktop-portal-wlr
(package
(name "xdg-desktop-portal-wlr")
- (version "0.4.0")
+ (version "0.5.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -2387,7 +2387,7 @@ (define-public xdg-desktop-portal-wlr
(file-name (git-file-name name version))
(sha256
(base32
- "13fbzh8bjnhk4xs8j9bpc01q3hy27zpbf0gkk1fnh3hm5pnyfyiv"))))
+ "1ipg35gv8ja39ijwbyi96qlyq2y1fjdggl40s38rv68bsya8zry1"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 5/7] gnu: xdg-desktop-portal-wlr: Use new input style
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
` (3 preceding siblings ...)
2021-12-14 21:47 ` [bug#52492] [PATCH 4/7] gnu: xdg-desktop-portal-wlr: Update to 0.5.0 Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-14 21:47 ` [bug#52492] [PATCH 6/7] gnu: xdg-desktop-portal-wlr: Add binary dependencies Josselin Poiret via Guix-patches via
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Refactor it.
---
gnu/packages/freedesktop.scm | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a1608cbb70..e1827ffdad 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2395,13 +2395,12 @@ (define-public xdg-desktop-portal-wlr
"-Dsd-bus-provider=libelogind")))
(native-inputs
(list cmake pkg-config))
- (inputs
- `(("elogind" ,elogind)
- ("iniparser" ,iniparser)
- ("pipewire" ,pipewire-0.3)
- ("inih" ,libinih)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ (inputs (list elogind
+ iniparser
+ libinih
+ pipewire-0.3
+ wayland
+ wayland-protocols))
(home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
(synopsis "@code{xdg-desktop-portal} backend for wlroots")
(description
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 6/7] gnu: xdg-desktop-portal-wlr: Add binary dependencies
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
` (4 preceding siblings ...)
2021-12-14 21:47 ` [bug#52492] [PATCH 5/7] gnu: xdg-desktop-portal-wlr: Use new input style Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-19 12:24 ` [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Mathieu Othacehe
2021-12-14 21:47 ` [bug#52492] [PATCH 7/7] gnu: flameshot: Update to 0.10.2 Josselin Poiret via Guix-patches via
2021-12-19 12:22 ` bug#52492: [PATCH 0/7] Improve screen sharing support under Wayland Mathieu Othacehe
7 siblings, 1 reply; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch:
Add it.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Add
dependencies on bash-minimal, grim and slurp, and hardcode the paths
in source.
---
gnu/local.mk | 1 +
gnu/packages/freedesktop.scm | 23 +++++++++++++--
...g-desktop-portal-wlr-harcoded-length.patch | 28 +++++++++++++++++++
3 files changed, 50 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a138e574d0..9bbcd42733 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1914,6 +1914,7 @@ dist_patch_DATA = \
%D%/packages/patches/wpa-supplicant-CVE-2021-27803.patch \
%D%/packages/patches/wpa-supplicant-CVE-2021-30004.patch \
%D%/packages/patches/x265-arm-flags.patch \
+ %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
%D%/packages/patches/xf86-video-ark-remove-mibstore.patch \
%D%/packages/patches/xf86-video-mach64-bool-to-boolean.patch \
%D%/packages/patches/xf86-video-mach64-glibc-2.20.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e1827ffdad..1ed09dbf2c 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2387,18 +2387,37 @@ (define-public xdg-desktop-portal-wlr
(file-name (git-file-name name version))
(sha256
(base32
- "1ipg35gv8ja39ijwbyi96qlyq2y1fjdggl40s38rv68bsya8zry1"))))
+ "1ipg35gv8ja39ijwbyi96qlyq2y1fjdggl40s38rv68bsya8zry1"))
+ (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
'("-Dsystemd=disabled"
- "-Dsd-bus-provider=libelogind")))
+ "-Dsd-bus-provider=libelogind")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'hardcode-binaries
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((sh (search-input-file inputs "/bin/sh"))
+ (grim (search-input-file inputs "/bin/grim"))
+ (slurp (search-input-file inputs "/bin/slurp")))
+ (substitute* "src/screenshot/screenshot.c"
+ (("grim") grim)
+ (("slurp") slurp)
+ (("execl\\(\"/bin/sh\", \"/bin/sh\"")
+ (string-append "execl(\"" sh "\", \"" sh "\"")))
+ (substitute* "src/screencast/screencast.c"
+ (("execvp\\(\"sh")
+ (string-append "execvp(\"" sh)))))))))
(native-inputs
(list cmake pkg-config))
(inputs (list elogind
+ bash-minimal
+ grim
iniparser
libinih
pipewire-0.3
+ slurp
wayland
wayland-protocols))
(home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
diff --git a/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch
new file mode 100644
index 0000000000..b499a039e8
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch
@@ -0,0 +1,28 @@
+From 3121eeb5e68bedd6e2398f35b9bd60b69709a47e Mon Sep 17 00:00:00 2001
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Tue, 14 Dec 2021 18:49:54 +0100
+Subject: [PATCH] Replace hardcoded command length
+
+---
+ src/screenshot/screenshot.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/screenshot/screenshot.c b/src/screenshot/screenshot.c
+index 9df0ea7..5f27681 100644
+--- a/src/screenshot/screenshot.c
++++ b/src/screenshot/screenshot.c
+@@ -42,8 +42,9 @@ static bool exec_screenshooter_interactive(const char *path) {
+ perror("fork");
+ return false;
+ } else if (pid == 0) {
+- char cmd[strlen(path) + 25];
+- snprintf(cmd, sizeof(cmd), "grim -g \"$(slurp)\" -- %s", path);
++ const char cmd_fmt[] = "grim -g \"$(slurp)\" -- %s";
++ char cmd[strlen(path) + sizeof(cmd_fmt)];
++ snprintf(cmd, sizeof(cmd), cmd_fmt, path);
+ execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
+ perror("execl");
+ exit(127);
+--
+2.34.0
+
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#52492] [PATCH 7/7] gnu: flameshot: Update to 0.10.2
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
` (5 preceding siblings ...)
2021-12-14 21:47 ` [bug#52492] [PATCH 6/7] gnu: xdg-desktop-portal-wlr: Add binary dependencies Josselin Poiret via Guix-patches via
@ 2021-12-14 21:47 ` Josselin Poiret via Guix-patches via
2021-12-19 12:22 ` bug#52492: [PATCH 0/7] Improve screen sharing support under Wayland Mathieu Othacehe
7 siblings, 0 replies; 12+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 21:47 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492
* gnu/packages/image.scm (flameshot): Update it.
---
gnu/packages/image.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index b6378a3890..8bed2da65c 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1823,7 +1823,7 @@ (define-public libiptcdata
(define-public flameshot
(package
(name "flameshot")
- (version "0.8.5")
+ (version "0.10.2")
(source
(origin
(method git-fetch)
@@ -1833,7 +1833,7 @@ (define-public flameshot
(file-name (git-file-name name version))
(sha256
(base32
- "1z77igs60lz106vsf6wsayxjafxm3llf2lm4dpvsqyyrxybfq191"))))
+ "07n98pp5i6i51g7a4vqwbd6xarihzl7r714r2knvw2zn5mlj55dd"))))
(build-system qt-build-system)
(native-inputs
(list qttools))
--
2.34.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* bug#52492: [PATCH 0/7] Improve screen sharing support under Wayland
2021-12-14 21:45 [bug#52492] [PATCH 0/7] Improve screen sharing support under Wayland Josselin Poiret via Guix-patches via
` (6 preceding siblings ...)
2021-12-14 21:47 ` [bug#52492] [PATCH 7/7] gnu: flameshot: Update to 0.10.2 Josselin Poiret via Guix-patches via
@ 2021-12-19 12:22 ` Mathieu Othacehe
7 siblings, 0 replies; 12+ messages in thread
From: Mathieu Othacehe @ 2021-12-19 12:22 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 52492-done
Hey Josselin,
Thanks for working on that. I fixed a few minor details and pushed the
series.
> I can get screensharing working in icecat on sway by manually starting
> pipewire then wireplumber (and then xdg-desktop-portal-wlr followed by
> xdg-desktop-portal if they're not installed in your profile, otherwise
> your user DBus session will launch them automatically), and starting
> icecat with
As discussed on #guix, we may need to find a way to start those services
automatically.
> since the pipewire library is dlopened by libwebrtc rather than
> statically or dynamically linked. We could possibly add this to the
> icecat package, as it has a wrapper doing a similar thing for other
> libraries.
Seems fair.
I also tried to run obs, this way:
--8<---------------cut here---------------start------------->8---
QT_QPA_PLATFORM=wayland obs
--8<---------------cut here---------------end--------------->8---
was prompted for a screen/window to capture using pipewire, but then I
have the following error, does that ring a bell?
--8<---------------cut here---------------start------------->8---
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: - source: 'Window Capture (PipeWire)' (pipewire-window-capture-source)
info: ------------------------------------------------
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
info: [pipewire] available cursor modes:
info: [pipewire] - Metadata
info: [pipewire] - Always visible
info: [pipewire] - Hidden
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /gnu/store/1fp8wl9y2i72ld59d1spw85xvw9l88ws-obs-27.0.1/share/obs/obs-studio/images/overflow.png
info: [pipewire] screencast session created
info: [pipewire] asking for window…
info: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux)
warning: [pipewire] Failed to start screencast, denied or cancelled by user
info: PipeWire initialized (sender name: 1_1734)
info: User added source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) to scene 'Scene'
info: [pipewire] available cursor modes:
info: [pipewire] - Metadata
info: [pipewire] - Always visible
info: [pipewire] - Hidden
info: [pipewire] screencast session created
info: [pipewire] asking for desktop…
warning: [pipewire] Failed to start screencast, denied or cancelled by user
^Cinfo: ==== Shutting down ==================================================
--8<---------------cut here---------------end--------------->8---
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 12+ messages in thread