[PATCH] gnu: linux: update PipeWire & WirePlumber

OpenSubmitted by Kevin Boulain.
Details
4 participants
  • fesoj000
  • Kevin Boulain
  • Brendan Tildesley
  • Maxime Devos
Owner
unassigned
Severity
normal
K
K
Kevin Boulain wrote on 13 Mar 23:35 +0100
(address . guix-patches@gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220313223533.9632-1-kevinboulain@gmail.com
* gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.48.
Also add a few more inputs to PipeWire to enable a few options:
- libfdk to support the AAC Bluetooth codec
- libsndfile to build pw-cat
* gnu/packages/linux.scm (wireplumber): Update to 0.4.8.

---

PipeWire also supports the aptX Bluetooth codec but the situation
appears to be very muddy: some distributions like Debian, Gentoo or
Arch package libfreeaptx (a fork of libopenaptx to work around licensing
issues) but other like Fedora or OpenSUSE refuse to do it.
---
gnu/packages/linux.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d7ebf54c18..1d1429cdbd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8280,7 +8280,7 @@ (define-public pipewire-0.3
   (package
     (inherit pipewire)
     (name "pipewire")
-    (version "0.3.43")
+    (version "0.3.48")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -8289,7 +8289,7 @@ (define-public pipewire-0.3
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gp2h0sidapcqmnifl0iipdmbzb18bdh8zdi7pfywr9gsksh0cxy"))))
+                "0abi8z7rfzspsiydc5j5l0x3dqizs5hf726xq30n32jqkwq3y2gs"))))
     (arguments
      '(#:configure-flags
        (list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
@@ -8305,6 +8305,8 @@ (define-public pipewire-0.3
                        bluez
                        jack-2
                        ldacbt
+                       libfdk
+                       libsndfile
                        pulseaudio
                        vulkan-loader
                        vulkan-headers)))))
@@ -8312,7 +8314,7 @@ (define-public pipewire-0.3
 (define-public wireplumber
   (package
     (name "wireplumber")
-    (version "0.4.6")
+    (version "0.4.8")
     (source
      (origin
        (method git-fetch)
@@ -8322,7 +8324,7 @@ (define-public wireplumber
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0g7xkgkjlxrhs49hqkwrjk2hb478gq55wwydafvvbsv78vsa7qfb"))))
+        (base32 "1xhbymfml6k6l1iqgfbibgbai3j2mb9fkiyvcmk1w7nap21f01y7"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Dsystemd=disabled"
-- 
2.34.0
B
B
Brendan Tildesley wrote on 14 Mar 09:25 +0100
1926705393.215334.1647246338511@office.mailbox.org
If you are updating pipewire, I'd like to add to it:

1. The attached libfreeatpx patch, or perhaps an improved patch. maybe one could expand on the description.

2. Add the following dependencies to inputs:
libfdk for ACC support over bluetooth
libfreeaptx for aptX support over bluetooth
libsndfile
libusb for bluetooth support
lilv for lv2 plugins
webrtc-audio-processing for noise cancelling
readline for pw-cli

3. Consider renaming pipewire-0.3 to pipewire and pipewire to pipewire-0.2 to keep pipewire as the latest.
pipewire 0.2 is only needed by weston 9. weston 10 can use 0.3, but i was getting compilation errors.
From a3c7a4a7ec34eeae57deb76033e7e6224760b7f5 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Sat, 12 Mar 2022 20:09:17 +1100
Subject: [PATCH] gnu: Add libfreeaptx.

* gnu/packages/audio.scm (libfreeaptx): New variable.
---
gnu/packages/audio.scm | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 13e0f02837..ae93097354 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018, 2021 Thorsten Wilms <t_w_@freenet.de>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2018, 2022 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019, 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
@@ -4686,6 +4686,36 @@ (define-public libfdk
     (license (license:fsf-free "https://github.com/mstorsjo/fdk-aac/blob/master/NOTICE"
                                "https://www.gnu.org/licenses/license-list.html#fdk"))))
 
+(define-public libfreeaptx
+  (package
+    (name "libfreeaptx")
+    (version "0.1.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/iamthehorker/libfreeaptx")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1fm5041nd08yzg0m9474g0943lb3x54zmn59b53nhvxan8x22ibq"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f
+           #:make-flags
+           #~(list
+              (string-append "DESTDIR=" #$output)
+              "PREFIX="
+              (string-append "LDFLAGS=" "-Wl,-rpath=" #$output "/lib")
+              (string-append "CC=" #$(cc-for-target)))
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure))))
+    (home-page "https://github.com/iamthehorker/libfreeaptx")
+    (synopsis "aptX codec library")
+    (description "Implementation of the aptX and aptX ND codecs.")
+    (license license:lgpl2.1+)))
+
 (define-public libopenshot-audio
   (package
     (name "libopenshot-audio")
-- 
2.34.0
B
B
Brendan Tildesley wrote on 14 Mar 10:06 +0100
1070872941.221773.1647248806490@office.mailbox.org
Fixed up the description a little.
From 90c797f62d3868e2981167050d56bf3a581fbd89 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Sat, 12 Mar 2022 20:09:17 +1100
Subject: [PATCH v2] gnu: Add libfreeaptx.

* gnu/packages/audio.scm (libfreeaptx): New variable.
---
gnu/packages/audio.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 13e0f02837..b2a00a6093 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018, 2021 Thorsten Wilms <t_w_@freenet.de>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2018, 2022 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019, 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
@@ -4686,6 +4686,37 @@ (define-public libfdk
     (license (license:fsf-free "https://github.com/mstorsjo/fdk-aac/blob/master/NOTICE"
                                "https://www.gnu.org/licenses/license-list.html#fdk"))))
 
+(define-public libfreeaptx
+  (package
+    (name "libfreeaptx")
+    (version "0.1.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/iamthehorker/libfreeaptx")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1fm5041nd08yzg0m9474g0943lb3x54zmn59b53nhvxan8x22ibq"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ;no tests.
+           #:make-flags
+           #~(list "PREFIX="
+                   (string-append "DESTDIR=" #$output)
+                   (string-append "LDFLAGS=" "-Wl,-rpath=" #$output "/lib")
+                   (string-append "CC=" #$(cc-for-target)))
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure))))
+    (home-page "https://github.com/iamthehorker/libfreeaptx")
+    (synopsis "aptX codec library")
+    (description "libfreeaptx is an implementation of the Audio Processing
+Technology codecs aptX and aptX HD, mainly intended for use with an A2DP
+bluetooth profile.")
+    (license license:lgpl2.1+)))
+
 (define-public libopenshot-audio
   (package
     (name "libopenshot-audio")
-- 
2.34.0
K
K
Kevin Boulain wrote on 15 Mar 00:06 +0100
[PATCH 1/2] gnu: linux: update PipeWire & WirePlumber
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220314230647.11344-1-kevinboulain@gmail.com
* gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.48.
Also add a few more inputs to PipeWire to enable a few options:
- libfdk to support the AAC Bluetooth codec
- libsndfile to build pw-cat
- libusb for Bluetooth quirks
- lilv for LV2 plugins
- readline to build pw-cli
- webrtc-audio-processing for echo cancellation
* gnu/packages/linux.scm (wireplumber): Update to 0.4.8.

---

PipeWire also supports the aptX Bluetooth codec but the situation
appears to be very muddy: some distributions like Debian, Gentoo or
Arch package libfreeaptx (a fork of libopenaptx to work around licensing
issues) but other like Fedora or OpenSUSE refuse to do it.
---
gnu/packages/linux.scm | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d7ebf54c18..c09276b319 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8280,7 +8280,7 @@ (define-public pipewire-0.3
   (package
     (inherit pipewire)
     (name "pipewire")
-    (version "0.3.43")
+    (version "0.3.48")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -8289,7 +8289,7 @@ (define-public pipewire-0.3
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gp2h0sidapcqmnifl0iipdmbzb18bdh8zdi7pfywr9gsksh0cxy"))))
+                "0abi8z7rfzspsiydc5j5l0x3dqizs5hf726xq30n32jqkwq3y2gs"))))
     (arguments
      '(#:configure-flags
        (list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
@@ -8305,14 +8305,20 @@ (define-public pipewire-0.3
                        bluez
                        jack-2
                        ldacbt
+                       libfdk
+                       libsndfile
+                       libusb
+                       lilv
                        pulseaudio
+                       readline
                        vulkan-loader
-                       vulkan-headers)))))
+                       vulkan-headers
+                       webrtc-audio-processing)))))
 
 (define-public wireplumber
   (package
     (name "wireplumber")
-    (version "0.4.6")
+    (version "0.4.8")
     (source
      (origin
        (method git-fetch)
@@ -8322,7 +8328,7 @@ (define-public wireplumber
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0g7xkgkjlxrhs49hqkwrjk2hb478gq55wwydafvvbsv78vsa7qfb"))))
+        (base32 "1xhbymfml6k6l1iqgfbibgbai3j2mb9fkiyvcmk1w7nap21f01y7"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Dsystemd=disabled"
-- 
2.34.0
K
K
Kevin Boulain wrote on 15 Mar 00:06 +0100
[PATCH 2/2] gnu: rename pipewire to pipewire-0.2 and pipewire-0.3 to pipewire
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220314230647.11344-2-kevinboulain@gmail.com
* gnu/packages/chromium.scm (ungoogled-chromium): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (weston): Change inputs from
pipewire to pipewire-0.2.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Change inputs
from pipewire-0.3 to pipewire.
* gnu/packages/gnome.scm (mutter): Change native-inputs and inputs from
pipewire-0.3 to pipewire.
* gnu/packages/kde-systemtools.scm (krfb): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/linux.scm (pipewire): Rename to pipewire-0.2.
* gnu/packages/linux.scm (pipewire-0.3): Rename to pipewire.
* gnu/packages/linux.scm (wireplumber): Change inputs from pipewire-0.3
to pipewire.
* gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Change inputs
from pipewire to pipewire-0.2.
* gnu/packages/video.scm (obs): Change inputs from pipewire-0.3 to
pipewire.
---
gnu/packages/chromium.scm | 2 +-
gnu/packages/freedesktop.scm | 6 +++---
gnu/packages/gnome.scm | 4 ++--
gnu/packages/kde-systemtools.scm | 2 +-
gnu/packages/linux.scm | 10 +++++-----
gnu/packages/telegram.scm | 2 +-
gnu/packages/video.scm | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)

Toggle diff (150 lines)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 7ef1e5ac1b..f60c9719fe 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -849,7 +849,7 @@ (define-public ungoogled-chromium
            opus+custom
            pango
            pciutils
-           pipewire-0.3
+           pipewire
            pulseaudio
            re2
            snappy
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 55bde8e705..b1248c466d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1120,7 +1120,7 @@ (define-public weston
        ("mtdev" ,mtdev)
        ("linux-pam" ,linux-pam)
        ("pango" ,pango)
-       ("pipewire" ,pipewire)
+       ("pipewire" ,pipewire-0.2)
        ("wayland-protocols" ,wayland-protocols)
        ("xorg-server-xwayland" ,xorg-server-xwayland)))
     (propagated-inputs
@@ -2313,7 +2313,7 @@ (define-public xdg-desktop-portal
        ("libportal" ,libportal)
        ("dbus" ,dbus)
        ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("fuse" ,fuse)))
     (arguments
      `(#:phases
@@ -2442,7 +2442,7 @@ (define-public xdg-desktop-portal-wlr
                   grim
                   iniparser
                   libinih
-                  pipewire-0.3
+                  pipewire
                   slurp
                   wayland
                   wayland-protocols))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 381ea04ea0..3eeba5e818 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7540,7 +7540,7 @@ (define-public mutter
        ;; theme to please libxcursor.
        ("adwaita-icon-theme" ,adwaita-icon-theme)
        ("libxcursor" ,libxcursor)       ;for XCURSOR_PATH
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("python" ,python)
        ("python-dbus" ,python-dbus)
        ("python-dbusmock" ,python-dbusmock)
@@ -7583,7 +7583,7 @@ (define-public mutter
        ("libxkbfile" ,libxkbfile)
        ("libxrandr" ,libxrandr)
        ("libxtst" ,libxtst)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("startup-notification" ,startup-notification)
        ("sysprof" ,sysprof)
        ("upower-glib" ,upower)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 3fab9089f3..205cd24e9d 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -254,7 +254,7 @@ (define-public krfb
            libxcb
            libxtst
            oxygen-icons ;; default icon set
-           pipewire-0.3
+           pipewire
            qtbase-5
            qtx11extras
            xcb-util-image
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c09276b319..ba6508c36b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8234,7 +8234,7 @@ (define-public inputattach
 types and interfaces and translates so that the X server can use them.")
     (license license:gpl2+)))
 
-(define-public pipewire
+(define-public pipewire-0.2
   (package
     (name "pipewire")
     (version "0.2.7")
@@ -8276,9 +8276,9 @@ (define-public pipewire
 of Linux application development.")
     (license license:lgpl2.0+)))
 
-(define-public pipewire-0.3
+(define-public pipewire
   (package
-    (inherit pipewire)
+    (inherit pipewire-0.2)
     (name "pipewire")
     (version "0.3.48")
     (source (origin
@@ -8300,7 +8300,7 @@ (define-public pipewire-0.3
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
-    (inputs (modify-inputs (package-inputs pipewire)
+    (inputs (modify-inputs (package-inputs pipewire-0.2)
               (prepend avahi
                        bluez
                        jack-2
@@ -8336,7 +8336,7 @@ (define-public wireplumber
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
-    (inputs (list dbus elogind glib lua pipewire-0.3))
+    (inputs (list dbus elogind glib lua pipewire))
     (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
     (synopsis "Session / policy manager implementation for PipeWire")
     (description "WirePlumber is a modular session / policy manager for
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 6c5efc50b9..4213ac6e4e 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -166,7 +166,7 @@ (define-public webrtc-for-telegram-desktop
           ("libxrandr" ,libxrandr)
           ("openssl" ,openssl)
           ("opus" ,opus)
-          ("pipewire" ,pipewire)
+          ("pipewire" ,pipewire-0.2)
           ("protobuf" ,protobuf)
           ("pulseaudio" ,pulseaudio)
           ("x11" ,libx11)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index dc05c0a222..a5298ccfac 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3429,7 +3429,7 @@ (define-public obs
       libxcomposite
       mbedtls-apache
       mesa
-      pipewire-0.3
+      pipewire
       pulseaudio
       qtbase-5
       qtsvg
-- 
2.34.0
K
K
Kevin Boulain wrote on 15 Mar 00:06 +0100
Re: [bug#54379] [PATCH] gnu: linux: update PipeWire & WirePlumber
(name . Brendan Tildesley)(address . mail@brendan.scot)(name . 54379@debbugs.gnu.org)(address . 54379@debbugs.gnu.org)
CABaj1X9901OCKvOxrWtkb7JmTNhUr5AwXB6fdovQVUDauL6e9w@mail.gmail.com
On Mon, 14 Mar 2022 at 09:25, Brendan Tildesley <mail@brendan.scot> wrote:
Toggle quote (5 lines)
>
> If you are updating pipewire, I'd like to add to it:
>
> 1. The attached libfreeatpx patch, or perhaps an improved patch. maybe one could expand on the description.

It's very similar to what I've done locally. I decided to not include
libfreeaptx in the first patch, even though I confirm it worked for me
and I was able to use the aptX codec, because other distributions like
have decided not too. Interestingly Debian includes it in its main
I'm not sure of the legality of all that, even if the patents appear
to have expired, I'm sure someone must know better than me (is there a
contact point in Guix or GNU?).

Toggle quote (3 lines)
> 2. Add the following dependencies to inputs:
> libfdk for ACC support over bluetooth

The AAC codec is already supported and included in the patch I
submitted (libfdk was added to the inputs), the build system picked it
up (but I can't test the codec).

Toggle quote (2 lines)
> libfreeaptx for aptX support over bluetooth

See above.

Toggle quote (2 lines)
> libsndfile

Already done in the patch, I confirm I could pw-record and pw-play
(symlinks to pw-cat).

Toggle quote (5 lines)
> libusb for bluetooth support
> lilv for lv2 plugins
> webrtc-audio-processing for noise cancelling
> readline for pw-cli

Good point, I'll send an updated patch (I can't test them all but they
were recognised during the configure).

Toggle quote (3 lines)
> 3. Consider renaming pipewire-0.3 to pipewire and pipewire to pipewire-0.2 to keep pipewire as the latest.
> pipewire 0.2 is only needed by weston 9. weston 10 can use 0.3, but i was getting compilation errors.

It was also bothering me a bit. Don't mind if I do :)
B
B
Brendan Tildesley wrote on 30 Mar 03:01 +0200
(name . Kevin Boulain)(address . kevinboulain@gmail.com)(address . 54379@debbugs.gnu.org)
5b0c276c-f5da-f6e3-8b42-7378436acfb4@brendan.scot
Just two more things if you wouldn't mind.

1. Add "-Dsysconfdir=/etc" to configure-flags so /etc/pipewire is used
instead of the output store path.

2. Remove sdl2 from inputs because it is only used to build examples.


There are also other misc things like raop, roc, libcanberra if you care
to look in to what they do
F
F
fesoj000 wrote on 30 Mar 06:23 +0200
(address . 54379@debbugs.gnu.org)
d1788f97-6d92-bf7f-d503-576f1f352b2d@gmail.com
On 3/30/22 3:01 AM, Brendan Tildesley wrote:
Toggle quote (1 lines)
> 1. Add "-Dsysconfdir=/etc" to configure-flags so /etc/pipewire is used instead of the output store path.
How do you use pipewire? The store output configuration is the package default. If you need some special
settings you can use "~/.config/pipewire/" to overwrite the settings you want to change.

So far it was perfect to have the immutable default config in the store and reference it for your own
settings. Especially after a breaking change in pipewire, this immutable config in the store path can be
very valuable to get a working setup again.

I do not care what the default config directory is, but i would like to keep the default config as part
of the package.

BR
K
K
Kevin Boulain wrote on 30 Mar 21:14 +0200
(name . fesoj000)(address . fesoj000@gmail.com)
CABaj1X8Mq7rqHPHdp6Mb0DbmozuWbahRu4euycSTjTJbxPQ5UA@mail.gmail.com
On Wed, 30 Mar 2022 at 06:22, fesoj000 <fesoj000@gmail.com> wrote:
Toggle quote (5 lines)
> On 3/30/22 3:01 AM, Brendan Tildesley wrote:
> > 1. Add "-Dsysconfdir=/etc" to configure-flags so /etc/pipewire is used instead of the output store path.
> How do you use pipewire? The store output configuration is the package default. If you need some special
> settings you can use "~/.config/pipewire/" to overwrite the settings you want to change.

I agree with the sentiment: it appears to be recommended to run
PipeWire as a user so I'm not quite sure what this will give (besides
making it easier to share the configuration between multiple users,
which is a valid goal).
Just copying (parts of) the standard configuration to ~/.config is
enough to override it.

Toggle quote (2 lines)
> > 2. Remove sdl2 from inputs because it is only used to build examples.

Done. I feared it would break pipewire@0.2 (it was much more used
then) but it builds.

Toggle quote (3 lines)
> > There are also other misc things like raop, roc, libcanberra if you care
> > to look in to what they do

I've added OpenSSL to build raop (apparently it's for AirPlay). For
the rest, see the next patch email.
Also, new minor versions of PipeWire and WirePlumber have been
released so I've updated the patch to reflect that.
K
K
Kevin Boulain wrote on 30 Mar 21:18 +0200
[PATCH 1/2] gnu: linux: update PipeWire & WirePlumber
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220330191818.5933-1-kevinboulain@gmail.com
* gnu/packages/linux.scm (pipewire): Use the official repository URL
instead of a mirror. Also remove sdl2 from the inputs as it's only used
in tests (and is very sparsely used with PipeWire 0.3).
* gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.49 and use the
official repository URL instead of a mirror. Also add a few more inputs
to enable a few options:
- libfdk to support the AAC Bluetooth codec
- libsndfile to build pw-cat
- libusb for Bluetooth quirks
- lilv for LV2 plugins
- openssl for raop-sink
- readline to build pw-cli
- webrtc-audio-processing for echo cancellation
And python-docutils to the native inputs to generate man pages.
X11 and libcanberra could be included for the X11 bell (no idea how
useful that is).
libcamera doesn't build with the current gstreamer version (g_memdup
is deprecated).
ROC doesn't appear to be in the packages yet so I'm skipping it.
* gnu/packages/linux.scm (wireplumber): Update to 0.4.9.

---

PipeWire also supports the aptX Bluetooth codec but the situation
appears to be very muddy: some distributions like Debian, Gentoo or
Arch package libfreeaptx (a fork of libopenaptx to work around licensing
issues) but others like Fedora or OpenSUSE refuse to do it so it's not
---
gnu/packages/linux.scm | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)

Toggle diff (83 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7aafcb636c..11330410ce 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8281,7 +8281,7 @@ (define-public pipewire
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
@@ -8301,8 +8301,7 @@ (define-public pipewire
            gstreamer
            gst-plugins-base
            libva
-           sbc
-           sdl2))
+           sbc))
     (home-page "https://pipewire.org/")
     (synopsis "Server and user space API to deal with multimedia pipelines")
     (description
@@ -8320,16 +8319,16 @@ (define-public pipewire-0.3
   (package
     (inherit pipewire)
     (name "pipewire")
-    (version "0.3.43")
+    (version "0.3.49")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gp2h0sidapcqmnifl0iipdmbzb18bdh8zdi7pfywr9gsksh0cxy"))))
+                "1nm5in95318gw18prq4jfx5qrpkn22hvmkii7f40ngkcs3zrf5zj"))))
     (arguments
      '(#:configure-flags
        (list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
@@ -8340,19 +8339,28 @@ (define-public pipewire-0.3
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
+    (native-inputs (modify-inputs (package-native-inputs pipewire)
+                     (prepend python-docutils))) ; For manpages.
     (inputs (modify-inputs (package-inputs pipewire)
               (prepend avahi
                        bluez
                        jack-2
                        ldacbt
+                       libfdk
+                       libsndfile
+                       libusb
+                       lilv
+                       openssl
                        pulseaudio
+                       readline
                        vulkan-loader
-                       vulkan-headers)))))
+                       vulkan-headers
+                       webrtc-audio-processing)))))
 
 (define-public wireplumber
   (package
     (name "wireplumber")
-    (version "0.4.6")
+    (version "0.4.9")
     (source
      (origin
        (method git-fetch)
@@ -8362,7 +8370,7 @@ (define-public wireplumber
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0g7xkgkjlxrhs49hqkwrjk2hb478gq55wwydafvvbsv78vsa7qfb"))))
+        (base32 "0m90ymkrrcqrgr3y8x6i6836w0m3anlrv2masww9050lw77aipak"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Dsystemd=disabled"
K
K
Kevin Boulain wrote on 30 Mar 21:18 +0200
[PATCH 2/2] gnu: rename pipewire to pipewire-0.2 and pipewire-0.3 to pipewire
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220330191818.5933-2-kevinboulain@gmail.com
* gnu/packages/chromium.scm (ungoogled-chromium): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (weston): Change inputs from
pipewire to pipewire-0.2.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Change inputs
from pipewire-0.3 to pipewire.
* gnu/packages/gnome.scm (mutter): Change native-inputs and inputs from
pipewire-0.3 to pipewire.
* gnu/packages/kde-systemtools.scm (krfb): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/linux.scm (pipewire): Rename to pipewire-0.2.
* gnu/packages/linux.scm (pipewire-0.3): Rename to pipewire.
* gnu/packages/linux.scm (wireplumber): Change inputs from pipewire-0.3
to pipewire.
* gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Change inputs
from pipewire to pipewire-0.2.
* gnu/packages/video.scm (obs): Change inputs from pipewire-0.3 to
pipewire.
---
gnu/packages/chromium.scm | 2 +-
gnu/packages/freedesktop.scm | 6 +++---
gnu/packages/gnome.scm | 4 ++--
gnu/packages/kde-systemtools.scm | 2 +-
gnu/packages/linux.scm | 12 ++++++------
gnu/packages/telegram.scm | 2 +-
gnu/packages/video.scm | 2 +-
7 files changed, 15 insertions(+), 15 deletions(-)

Toggle diff (151 lines)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 7ef1e5ac1b..f60c9719fe 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -849,7 +849,7 @@ (define-public ungoogled-chromium
            opus+custom
            pango
            pciutils
-           pipewire-0.3
+           pipewire
            pulseaudio
            re2
            snappy
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 55bde8e705..b1248c466d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1120,7 +1120,7 @@ (define-public weston
        ("mtdev" ,mtdev)
        ("linux-pam" ,linux-pam)
        ("pango" ,pango)
-       ("pipewire" ,pipewire)
+       ("pipewire" ,pipewire-0.2)
        ("wayland-protocols" ,wayland-protocols)
        ("xorg-server-xwayland" ,xorg-server-xwayland)))
     (propagated-inputs
@@ -2313,7 +2313,7 @@ (define-public xdg-desktop-portal
        ("libportal" ,libportal)
        ("dbus" ,dbus)
        ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("fuse" ,fuse)))
     (arguments
      `(#:phases
@@ -2442,7 +2442,7 @@ (define-public xdg-desktop-portal-wlr
                   grim
                   iniparser
                   libinih
-                  pipewire-0.3
+                  pipewire
                   slurp
                   wayland
                   wayland-protocols))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8ff59f084b..41b1a1c010 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7557,7 +7557,7 @@ (define-public mutter
        ;; theme to please libxcursor.
        ("adwaita-icon-theme" ,adwaita-icon-theme)
        ("libxcursor" ,libxcursor)       ;for XCURSOR_PATH
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("python" ,python)
        ("python-dbus" ,python-dbus)
        ("python-dbusmock" ,python-dbusmock)
@@ -7600,7 +7600,7 @@ (define-public mutter
        ("libxkbfile" ,libxkbfile)
        ("libxrandr" ,libxrandr)
        ("libxtst" ,libxtst)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("startup-notification" ,startup-notification)
        ("sysprof" ,sysprof)
        ("upower-glib" ,upower)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 3fab9089f3..205cd24e9d 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -254,7 +254,7 @@ (define-public krfb
            libxcb
            libxtst
            oxygen-icons ;; default icon set
-           pipewire-0.3
+           pipewire
            qtbase-5
            qtx11extras
            xcb-util-image
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 11330410ce..d633ded1d3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8274,7 +8274,7 @@ (define-public inputattach
 types and interfaces and translates so that the X server can use them.")
     (license license:gpl2+)))
 
-(define-public pipewire
+(define-public pipewire-0.2
   (package
     (name "pipewire")
     (version "0.2.7")
@@ -8315,9 +8315,9 @@ (define-public pipewire
 of Linux application development.")
     (license license:lgpl2.0+)))
 
-(define-public pipewire-0.3
+(define-public pipewire
   (package
-    (inherit pipewire)
+    (inherit pipewire-0.2)
     (name "pipewire")
     (version "0.3.49")
     (source (origin
@@ -8339,9 +8339,9 @@ (define-public pipewire-0.3
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
-    (native-inputs (modify-inputs (package-native-inputs pipewire)
+    (native-inputs (modify-inputs (package-native-inputs pipewire-0.2)
                      (prepend python-docutils))) ; For manpages.
-    (inputs (modify-inputs (package-inputs pipewire)
+    (inputs (modify-inputs (package-inputs pipewire-0.2)
               (prepend avahi
                        bluez
                        jack-2
@@ -8378,7 +8378,7 @@ (define-public wireplumber
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
-    (inputs (list dbus elogind glib lua pipewire-0.3))
+    (inputs (list dbus elogind glib lua pipewire))
     (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
     (synopsis "Session / policy manager implementation for PipeWire")
     (description "WirePlumber is a modular session / policy manager for
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 6c5efc50b9..4213ac6e4e 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -166,7 +166,7 @@ (define-public webrtc-for-telegram-desktop
           ("libxrandr" ,libxrandr)
           ("openssl" ,openssl)
           ("opus" ,opus)
-          ("pipewire" ,pipewire)
+          ("pipewire" ,pipewire-0.2)
           ("protobuf" ,protobuf)
           ("pulseaudio" ,pulseaudio)
           ("x11" ,libx11)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index dc05c0a222..a5298ccfac 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3429,7 +3429,7 @@ (define-public obs
       libxcomposite
       mbedtls-apache
       mesa
-      pipewire-0.3
+      pipewire
       pulseaudio
       qtbase-5
       qtsvg
B
B
Brendan Tildesley wrote on 31 Mar 07:40 +0200
Re: [bug#54379] [PATCH] gnu: linux: update PipeWire & WirePlumber
(address . 54379@debbugs.gnu.org)
9e3cf473-b735-1d02-c5da-d1a53e3618fc@brendan.scot
On 30/3/22 14:23, fesoj000 wrote:
Toggle quote (8 lines)
> On 3/30/22 3:01 AM, Brendan Tildesley wrote:
>> 1. Add "-Dsysconfdir=/etc" to configure-flags so /etc/pipewire is
>> used instead of the output store path.
> How do you use pipewire? The store output configuration is the package
> default. If you need some special
> settings you can use "~/.config/pipewire/" to overwrite the settings
> you want to change.
>
I set PIPEWIRE_CONFIG_DIR=/etc/pipewire in /etc/environment and made etc
services to symink all the config
files there. but I think i will get rid of that in favour of sysconfdir.
Toggle quote (11 lines)
> So far it was perfect to have the immutable default config in the
> store and reference it for your own
> settings. Especially after a breaking change in pipewire, this
> immutable config in the store path can be
> very valuable to get a working setup again.
>
> I do not care what the default config directory is, but i would like
> to keep the default config as part
> of the package.
>
> BR
You don't need to worry about that because the default config is in
share/ not etc/. There is nothing in the etc/ besides ld.so.cache

This is how pipewire accesses config without sysconfigdir set:

b@jiu ~/code/guix [env]$ strace
/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/bin/pipewire
2>&1|rg '^access'
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No
such file or directory)
access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No
such file or directory)
access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/etc/pipewire/pipewire.conf",
R_OK) = -1 ENOENT (No such file or directory)
access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/share/pipewire/pipewire.conf",
R_OK) = 0
access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/share/pipewire/pipewire.conf.d",
R_OK) = -1 ENOENT (No such file or directory)
access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/etc/pipewire/pipewire.conf.d",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No
such file or directory)
access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No
such file or directory)

setting it just makes it do this:

b@jiu ~ [env]$ strace pipewire 2>&1|grep '^access'
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No
such file or directory)
access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No
such file or directory)
access("/etc/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or
directory)
access("/gnu/store/p7wpq9axacrzk43whbvg6r4f3v0bkyvz-pipewire-0.3.48/share/pipewire/pipewire.conf",
R_OK) = 0
access("/gnu/store/p7wpq9axacrzk43whbvg6r4f3v0bkyvz-pipewire-0.3.48/share/pipewire/pipewire.conf.d",
R_OK) = -1 ENOENT (No such file or directory)
access("/etc/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file
or directory)
access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No
such file or directory)
access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No
such file or directory)

So it allows for global config to be set in /etc without
PIPEWIRE_CONFIG_DIR. Note that PIPEWIRE_CONFIG_DIR isn't practical as a
default

because it sets the /only/ config dir and prevents any lookup in home
.config.
B
B
Brendan Tildesley wrote on 31 Mar 10:27 +0200
(name . Kevin Boulain)(address . kevinboulain@gmail.com)(name . 54379@debbugs.gnu.org)(address . 54379@debbugs.gnu.org)
d49be430-d1b6-c00d-60f0-1940e9ee9c1f@brendan.scot
Would you mind testing 0ad with pipewire? I'm finding I get no audio and
it says "no audio device found" after taking 30 seconds to load.
F
F
fesoj000 wrote on 1 Apr 14:46 +0200
(address . 54379@debbugs.gnu.org)
fbc9b28c-14f9-63c3-1679-7ab2cd98cf2d@gmail.com
On 3/31/22 7:40 AM, Brendan Tildesley wrote:
Toggle quote (39 lines)
>> So far it was perfect to have the immutable default config in the store and reference it for your own
>> settings. Especially after a breaking change in pipewire, this immutable config in the store path can be
>> very valuable to get a working setup again.
>>
>> I do not care what the default config directory is, but i would like to keep the default config as part
>> of the package.
>>
>> BR
> You don't need to worry about that because the default config is in share/ not etc/. There is nothing in the etc/ besides ld.so.cache
>
> This is how pipewire accesses config without sysconfigdir set:
>
> b@jiu ~/code/guix [env]$ strace /gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/bin/pipewire 2>&1|rg '^access'
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/etc/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/share/pipewire/pipewire.conf", R_OK) = 0
> access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/share/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/gnu/store/kvyhx5i5a6i63iihp20wj3yikhvf4si7-pipewire-0.3.48/etc/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
>
> setting it just makes it do this:
>
> b@jiu ~ [env]$ strace pipewire 2>&1|grep '^access'
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/etc/pipewire/pipewire.conf", R_OK) = -1 ENOENT (No such file or directory)
> access("/gnu/store/p7wpq9axacrzk43whbvg6r4f3v0bkyvz-pipewire-0.3.48/share/pipewire/pipewire.conf", R_OK) = 0
> access("/gnu/store/p7wpq9axacrzk43whbvg6r4f3v0bkyvz-pipewire-0.3.48/share/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/etc/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
> access("/home/b/.config/pipewire/pipewire.conf.d", R_OK) = -1 ENOENT (No such file or directory)
>
> So it allows for global config to be set in /etc without PIPEWIRE_CONFIG_DIR. Note that PIPEWIRE_CONFIG_DIR isn't practical as a default
>
> because it sets the /only/ config dir and prevents any lookup in home .config.
OK, that make sense.
K
K
Kevin Boulain wrote on 1 Apr 21:23 +0200
[PATCH 1/2] gnu: linux: update PipeWire & WirePlumber
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220401192354.7838-1-kevinboulain@gmail.com
* gnu/packages/linux.scm (pipewire): Use the official repository URL
instead of a mirror. Also remove sdl2 from the inputs as it's only used
in tests (and is very sparsely used with PipeWire 0.3).
* gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.49 and use the
official repository URL instead of a mirror. Also add a few more inputs
to enable a few options:
- libfdk to support the AAC Bluetooth codec
- libsndfile to build pw-cat
- libusb for Bluetooth quirks
- lilv for LV2 plugins
- openssl for raop-sink
- readline to build pw-cli
- webrtc-audio-processing for echo cancellation
And python-docutils to the native inputs to generate man pages.
X11 and libcanberra could be included for the X11 bell (no idea how
useful that is).
libcamera doesn't build with the current gstreamer version (g_memdup
is deprecated).
ROC doesn't appear to be in the packages yet so I'm skipping it.
Finally, set the sysconfigdir to /etc to allow configuring PipeWire
system-wide.
* gnu/packages/linux.scm (wireplumber): Update to 0.4.9.
Set the sysconfigdir to /etc to allow configuring WirePlumber
system-wide.

---

PipeWire also supports the aptX Bluetooth codec but the situation
appears to be very muddy: some distributions like Debian, Gentoo or
Arch package libfreeaptx (a fork of libopenaptx to work around licensing
issues) but others like Fedora or OpenSUSE refuse to do it so it's not
---
gnu/packages/linux.scm | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)

Toggle diff (94 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7aafcb636c..abe0185d43 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8281,7 +8281,7 @@ (define-public pipewire
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
@@ -8301,8 +8301,7 @@ (define-public pipewire
            gstreamer
            gst-plugins-base
            libva
-           sbc
-           sdl2))
+           sbc))
     (home-page "https://pipewire.org/")
     (synopsis "Server and user space API to deal with multimedia pipelines")
     (description
@@ -8320,39 +8319,49 @@ (define-public pipewire-0.3
   (package
     (inherit pipewire)
     (name "pipewire")
-    (version "0.3.43")
+    (version "0.3.49")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gp2h0sidapcqmnifl0iipdmbzb18bdh8zdi7pfywr9gsksh0cxy"))))
+                "1nm5in95318gw18prq4jfx5qrpkn22hvmkii7f40ngkcs3zrf5zj"))))
     (arguments
      '(#:configure-flags
        (list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
                             "/lib/udev/rules.d")
              "-Dsystemd=disabled"
-             "-Dsession-managers=[]")
+             "-Dsession-managers=[]"
+             "-Dsysconfdir=/etc")
        #:phases
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
+    (native-inputs (modify-inputs (package-native-inputs pipewire)
+                     (prepend python-docutils))) ; For manpages.
     (inputs (modify-inputs (package-inputs pipewire)
               (prepend avahi
                        bluez
                        jack-2
                        ldacbt
+                       libfdk
+                       libsndfile
+                       libusb
+                       lilv
+                       openssl
                        pulseaudio
+                       readline
                        vulkan-loader
-                       vulkan-headers)))))
+                       vulkan-headers
+                       webrtc-audio-processing)))))
 
 (define-public wireplumber
   (package
     (name "wireplumber")
-    (version "0.4.6")
+    (version "0.4.9")
     (source
      (origin
        (method git-fetch)
@@ -8362,11 +8371,12 @@ (define-public wireplumber
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0g7xkgkjlxrhs49hqkwrjk2hb478gq55wwydafvvbsv78vsa7qfb"))))
+        (base32 "0m90ymkrrcqrgr3y8x6i6836w0m3anlrv2masww9050lw77aipak"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Dsystemd=disabled"
-                           "-Dsystem-lua=true")))
+                           "-Dsystem-lua=true"
+                           "-Dsysconfdir=/etc")))
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
K
K
Kevin Boulain wrote on 1 Apr 21:23 +0200
[PATCH 2/2] gnu: rename pipewire to pipewire-0.2 and pipewire-0.3 to pipewire
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220401192354.7838-2-kevinboulain@gmail.com
* gnu/packages/chromium.scm (ungoogled-chromium): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (weston): Change inputs from
pipewire to pipewire-0.2.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Change inputs
from pipewire-0.3 to pipewire.
* gnu/packages/gnome.scm (mutter): Change native-inputs and inputs from
pipewire-0.3 to pipewire.
* gnu/packages/kde-systemtools.scm (krfb): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/linux.scm (pipewire): Rename to pipewire-0.2.
* gnu/packages/linux.scm (pipewire-0.3): Rename to pipewire.
* gnu/packages/linux.scm (wireplumber): Change inputs from pipewire-0.3
to pipewire.
* gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Change inputs
from pipewire to pipewire-0.2.
* gnu/packages/video.scm (obs): Change inputs from pipewire-0.3 to
pipewire.
---
gnu/packages/chromium.scm | 2 +-
gnu/packages/freedesktop.scm | 6 +++---
gnu/packages/gnome.scm | 4 ++--
gnu/packages/kde-systemtools.scm | 2 +-
gnu/packages/linux.scm | 12 ++++++------
gnu/packages/telegram.scm | 2 +-
gnu/packages/video.scm | 2 +-
7 files changed, 15 insertions(+), 15 deletions(-)

Toggle diff (151 lines)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 7ef1e5ac1b..f60c9719fe 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -849,7 +849,7 @@ (define-public ungoogled-chromium
            opus+custom
            pango
            pciutils
-           pipewire-0.3
+           pipewire
            pulseaudio
            re2
            snappy
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 55bde8e705..b1248c466d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1120,7 +1120,7 @@ (define-public weston
        ("mtdev" ,mtdev)
        ("linux-pam" ,linux-pam)
        ("pango" ,pango)
-       ("pipewire" ,pipewire)
+       ("pipewire" ,pipewire-0.2)
        ("wayland-protocols" ,wayland-protocols)
        ("xorg-server-xwayland" ,xorg-server-xwayland)))
     (propagated-inputs
@@ -2313,7 +2313,7 @@ (define-public xdg-desktop-portal
        ("libportal" ,libportal)
        ("dbus" ,dbus)
        ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("fuse" ,fuse)))
     (arguments
      `(#:phases
@@ -2442,7 +2442,7 @@ (define-public xdg-desktop-portal-wlr
                   grim
                   iniparser
                   libinih
-                  pipewire-0.3
+                  pipewire
                   slurp
                   wayland
                   wayland-protocols))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8ff59f084b..41b1a1c010 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7557,7 +7557,7 @@ (define-public mutter
        ;; theme to please libxcursor.
        ("adwaita-icon-theme" ,adwaita-icon-theme)
        ("libxcursor" ,libxcursor)       ;for XCURSOR_PATH
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("python" ,python)
        ("python-dbus" ,python-dbus)
        ("python-dbusmock" ,python-dbusmock)
@@ -7600,7 +7600,7 @@ (define-public mutter
        ("libxkbfile" ,libxkbfile)
        ("libxrandr" ,libxrandr)
        ("libxtst" ,libxtst)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("startup-notification" ,startup-notification)
        ("sysprof" ,sysprof)
        ("upower-glib" ,upower)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 3fab9089f3..205cd24e9d 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -254,7 +254,7 @@ (define-public krfb
            libxcb
            libxtst
            oxygen-icons ;; default icon set
-           pipewire-0.3
+           pipewire
            qtbase-5
            qtx11extras
            xcb-util-image
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index abe0185d43..74bebda024 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8274,7 +8274,7 @@ (define-public inputattach
 types and interfaces and translates so that the X server can use them.")
     (license license:gpl2+)))
 
-(define-public pipewire
+(define-public pipewire-0.2
   (package
     (name "pipewire")
     (version "0.2.7")
@@ -8315,9 +8315,9 @@ (define-public pipewire
 of Linux application development.")
     (license license:lgpl2.0+)))
 
-(define-public pipewire-0.3
+(define-public pipewire
   (package
-    (inherit pipewire)
+    (inherit pipewire-0.2)
     (name "pipewire")
     (version "0.3.49")
     (source (origin
@@ -8340,9 +8340,9 @@ (define-public pipewire-0.3
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
-    (native-inputs (modify-inputs (package-native-inputs pipewire)
+    (native-inputs (modify-inputs (package-native-inputs pipewire-0.2)
                      (prepend python-docutils))) ; For manpages.
-    (inputs (modify-inputs (package-inputs pipewire)
+    (inputs (modify-inputs (package-inputs pipewire-0.2)
               (prepend avahi
                        bluez
                        jack-2
@@ -8380,7 +8380,7 @@ (define-public wireplumber
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
-    (inputs (list dbus elogind glib lua pipewire-0.3))
+    (inputs (list dbus elogind glib lua pipewire))
     (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
     (synopsis "Session / policy manager implementation for PipeWire")
     (description "WirePlumber is a modular session / policy manager for
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 6c5efc50b9..4213ac6e4e 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -166,7 +166,7 @@ (define-public webrtc-for-telegram-desktop
           ("libxrandr" ,libxrandr)
           ("openssl" ,openssl)
           ("opus" ,opus)
-          ("pipewire" ,pipewire)
+          ("pipewire" ,pipewire-0.2)
           ("protobuf" ,protobuf)
           ("pulseaudio" ,pulseaudio)
           ("x11" ,libx11)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index dc05c0a222..a5298ccfac 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3429,7 +3429,7 @@ (define-public obs
       libxcomposite
       mbedtls-apache
       mesa
-      pipewire-0.3
+      pipewire
       pulseaudio
       qtbase-5
       qtsvg
K
K
Kevin Boulain wrote on 1 Apr 21:32 +0200
Re: [bug#54379] [PATCH] gnu: linux: update PipeWire & WirePlumber
(name . Brendan Tildesley)(address . mail@brendan.scot)(name . 54379@debbugs.gnu.org)(address . 54379@debbugs.gnu.org)
CABaj1X_VSb_ya3ZG-Vr6zOV5cCGt11vWs3xhsmsdr5oj5WJ9rA@mail.gmail.com
On Thu, 31 Mar 2022 at 07:40, Brendan Tildesley <mail@brendan.scot> wrote:
Toggle quote (8 lines)
> [...]
> So it allows for global config to be set in /etc without
> PIPEWIRE_CONFIG_DIR. Note that PIPEWIRE_CONFIG_DIR isn't practical as a
> default
>
> because it sets the /only/ config dir and prevents any lookup in home
> .config.

Makes sense, thanks. I did it for both PipeWire and WirePlumber, both
seem to try ~/.config, /etc and share/.

On Thu, 31 Mar 2022 at 10:27, Brendan Tildesley <mail@brendan.scot> wrote:
Toggle quote (3 lines)
> Would you mind testing 0ad with pipewire? I'm finding I get no audio and
> it says "no audio device found" after taking 30 seconds to load.

I guix installed it and got music in the menu (over Bluetooth, with
aptX). I'm not doing anything special (a single edit to
30-bluez-monitor.lua in ~/.config), I'm only inheriting from the
PipeWire and WirePlumber packages to get support for aptX and
installing/running them via Guix home (currently ./pre-inst-env guix
home reconfigure, my configuration is there if that matters:
M
M
Maxime Devos wrote on 1 Apr 21:34 +0200
Re: [bug#54379] [PATCH 1/2] gnu: linux: update PipeWire & WirePlumber
2aabfa0bffcb9d0d4302048fa70f165c1f5ed251.camel@telenet.be
Kevin Boulain schreef op vr 01-04-2022 om 21:23 [+0200]:
Toggle quote (10 lines)
> * [...] Also add a few more inputs
> to enable a few options:
>  - libfdk to support the AAC Bluetooth codec
>  - libsndfile to build pw-cat
>  - libusb for Bluetooth quirks
>  - lilv for LV2 plugins
>  - openssl for raop-sink
>  - readline to build pw-cli
>  - webrtc-audio-processing for echo cancellation

What's the impact on the output closure size?

Toggle quote (8 lines)
> And python-docutils to the native inputs to generate man pages.
> [...] libcamera doesn't build with the current gstreamer version (g_memdup
> is deprecated).
> [...], set the sysconfigdir to /etc to allow configuring PipeWire
> system-wide.
> [...] Set the sysconfigdir to /etc to allow configuring WirePlumber
> system-wide.

For future reference, I would put this information in comments in the
package definition. That seems much more convenient to me than having
to dig through the git history.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkdTrBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hh/AQDCNV2gap0LI8N0YbwIax2XycT/
Rih0qaWn4uw9qw12nAD9EQWjKorTFQ7huPrTiJQm7M0DBHR4EZIpDgPIUDBQaQA=
=yNgz
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 21:41 +0200
aa4530c3f2441518b93ec6dca2f2479c0444934c.camel@telenet.be
Kevin Boulain schreef op vr 01-04-2022 om 21:23 [+0200]:
Toggle quote (11 lines)
> * gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.49 and use the
> official repository URL instead of a mirror. Also add a few more inputs
> to enable a few options:
>  - libfdk to support the AAC Bluetooth codec
>  - libsndfile to build pw-cat
>  - libusb for Bluetooth quirks
>  - lilv for LV2 plugins
>  - openssl for raop-sink
>  - readline to build pw-cli
>  - webrtc-audio-processing for echo cancellation

Looks like some of these are only used for some plugins.
Can plugins be built separately? If they are built separately (and
hence, the 'main' pipewire package does not have these extra packages),
then updating, say, lilv, would cause less rebuilds.

This seems especially important given that 'pipewire' is becoming a
central component in the desktop world so ideally it would have a
minimal number of dependencies to avoid blowing up the package graph
...

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkdVWBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g3LAQCN+tZHrNCnLvJnsrH6eRh3ksgI
EPDStbA+eLIUgHA22QD8Cv1BijphkgYAyO5KWLH0NPdWWeFvtDSwsAQmTok4EAo=
=vrLT
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 21:42 +0200
ca9d030a18823ec1e877a5478f95c1cd00168a24.camel@telenet.be
Kevin Boulain schreef op vr 01-04-2022 om 21:23 [+0200]:
Toggle quote (8 lines)
>  (define-public wireplumber
>    (package
>      (name "wireplumber")
> -    (version "0.4.6")
> +    (version "0.4.9")
>      (source
>       (origin

Can this be updated in a separate patch or are pipewire and wireplumber
too intertwined?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkdVjRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7n+aAQDc1knJbITZsBF3iLXoX7wRV71b
wKh6pBTBreag0ZqVuAEAyCmH9t6RCAgcucbicBZH4h2NuokKcwwoFTQbPnjE1AE=
=x4ON
-----END PGP SIGNATURE-----


K
K
Kevin Boulain wrote on 1 Apr 22:44 +0200
[PATCH 0/3] gnu: linux: update PipeWire & WirePlumber
(address . 54379@debbugs.gnu.org)
20220401204441.8244-1-kevinboulain@gmail.com
On Fri, 1 Apr 2022 at 21:34, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (2 lines)
> What's the impact on the output closure size?

I assume you mean ./pre-inst-env guix size pipewire?
store item total self
/gnu/store/vbcfrng1aadxa79g7f8mlgm7wp9dzqwf-mesa-21.3.2 411.5 169.5 21.2%
/gnu/store/fvfymzksvj8k6pc54gmhx2lnvkxysfd8-llvm-11.0.0 221.5 149.5 18.7%
/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9 155.3 63.7 8.0%
/gnu/store/cnfsv9ywaacyafkqdqsv2ry8f01yr7a9-guile-3.0.7 129.1 52.0 6.5%
/gnu/store/hzic3ddl5yvnyw7gm4a0qc5icgqy2442-icu4c-69.1 110.7 38.0 4.7%
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33 38.3 36.6 4.6%
/gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib 71.7 33.4 4.2%
/gnu/store/6qlv57cr2xz37sarbwiv6ksqabf589p6-iso-codes-4.5.0 18.5 18.5 2.3%
/gnu/store/78b0194wv2d5vrqr408x2m2ndfy11j7j-eudev-3.2.11 102.2 17.7 2.2%
/gnu/store/84bvs9y0arsimxd2ay26a57xkqw7nsqm-glib-2.70.2 98.1 15.3 1.9%
/gnu/store/rvirnmnxxm2ymqgcxcnj3dxvnrnqlk0l-fftwf-3.3.8 85.9 13.2 1.6%
/gnu/store/614385afpnp5kcnixhrz5mz3fnbgyqkf-gst-plugins-base-1.18.5 656.1 12.8 1.6%
/gnu/store/df3ghmicrls14q2zcaj86217dicgnzs7-gstreamer-1.18.5 196.6 10.5 1.3%
/gnu/store/ln5dqqs2wkhhaqrpib5xqga0m1wpj028-pipewire-0.3.49 799.5 10.2 1.3%
/gnu/store/gkjna040y14xvk4y5mcccvjkkmdcvmnv-font-dejavu-2.37 9.8 9.8 1.2%
/gnu/store/5583c2za2jsn9g6az79rnksgvigwnsk7-util-linux-2.37.2-lib 80.7 9.0 1.1%
/gnu/store/84v5kpb4wcag0q173rq1jc9ajc953455-pulseaudio-15.0 304.1 8.9 1.1%
/gnu/store/3dy6pwfayfwdmf9y3rm4yaryzxkbdqv7-libical-3.0.10 149.6 7.5 0.9%
/gnu/store/9rrnm5hdjw7cy96a2a9rfgh6y08wsbmf-ncurses-6.2.20210619 77.6 5.9 0.7%
/gnu/store/zkl2vfmlifcyxphidx5nbv177qs9ziaz-harfbuzz-2.8.2 147.3 5.5 0.7%
/gnu/store/plr00nij45964cyy7sfcg5rcsi8hks0h-openssl-1.1.1l 77.2 5.5 0.7%
[...]
total: 799.5 MiB

Do you need the full output (where should I paste it)?
WirePumber doesn't add much:
[...]
/gnu/store/x4aak1x0l6wvb229zdqh3lh94bf2kl0j-wireplumber-0.4.9 802.3 1.5 0.2%
/gnu/store/wa7cjcx12pgx2zpk2psmlpxkmkqn79ri-lua-5.3.5 80.3 1.3 0.2%
[...]
total: 802.3 MiB

Toggle quote (4 lines)
> For future reference, I would put this information in comments in the
> package definition. That seems much more convenient to me than having
> to dig through the git history.

I wasn't too sure if that's common style, but I also prefer commenting the
dependencies when they aren't obvious. Done.

On Fri, 1 Apr 2022 at 21:41, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (2 lines)
> Looks like some of these are only used for some plugins.

Yeah, most of them.

Toggle quote (4 lines)
> Can plugins be built separately? If they are built separately (and
> hence, the 'main' pipewire package does not have these extra packages),
> then updating, say, lilv, would cause less rebuilds.

I've no idea how that works on Guix, I assume it's not as simple as with other
distributions where all libraries/plugins can be found in a single place (/lib).
Do you have an example? I agree it would be nicer and I'm happy to split the
package (talking about plugins, do you happen to have some pointers for

On Fri, 1 Apr 2022 at 21:42, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (3 lines)
> Can this be updated in a separate patch or are pipewire and wireplumber
> too intertwined?

It builds and plays sound. I've split the commit.

Kevin Boulain (3):
gnu: linux: update PipeWire
gnu: linux: update WirePlumber
gnu: rename pipewire to pipewire-0.2 and pipewire-0.3 to pipewire

gnu/packages/chromium.scm | 2 +-
gnu/packages/freedesktop.scm | 6 ++--
gnu/packages/gnome.scm | 4 +--
gnu/packages/kde-systemtools.scm | 2 +-
gnu/packages/linux.scm | 49 ++++++++++++++++++++------------
gnu/packages/telegram.scm | 2 +-
gnu/packages/video.scm | 2 +-
7 files changed, 40 insertions(+), 27 deletions(-)
K
K
Kevin Boulain wrote on 1 Apr 22:44 +0200
[PATCH 1/3] gnu: linux: update PipeWire
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220401204441.8244-2-kevinboulain@gmail.com
* gnu/packages/linux.scm (pipewire): Use the official repository URL
instead of a mirror. Also remove sdl2 from the inputs as it's only used
in tests (and is very sparsely used with PipeWire 0.3).
* gnu/packages/linux.scm (pipewire-0.3): Update to 0.3.49 and use the
official repository URL instead of a mirror. Also add a few more inputs
to enable a few options:
- libfdk to support the AAC Bluetooth codec
- libsndfile to build pw-cat
- libusb for Bluetooth quirks
- lilv for LV2 plugins
- openssl for raop-sink
- readline to build pw-cli
- webrtc-audio-processing for echo cancellation
And python-docutils to the native inputs to generate man pages.
X11 and libcanberra could be included for the X11 bell (no idea how
useful that is).
libcamera doesn't build with the current gstreamer version (g_memdup
is deprecated).
ROC doesn't appear to be in the packages yet so I'm skipping it.
Finally, set the sysconfigdir to /etc to allow configuring PipeWire
system-wide.

---

PipeWire also supports the aptX Bluetooth codec but the situation
appears to be very muddy: some distributions like Debian, Gentoo or
Arch package libfreeaptx (a fork of libopenaptx to work around licensing
issues) but others like Fedora or OpenSUSE refuse to do it so it's not
---
gnu/packages/linux.scm | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)

Toggle diff (76 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7aafcb636c..40166ad36e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8281,7 +8281,7 @@ (define-public pipewire
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
@@ -8301,8 +8301,7 @@ (define-public pipewire
            gstreamer
            gst-plugins-base
            libva
-           sbc
-           sdl2))
+           sbc))
     (home-page "https://pipewire.org/")
     (synopsis "Server and user space API to deal with multimedia pipelines")
     (description
@@ -8320,34 +8319,46 @@ (define-public pipewire-0.3
   (package
     (inherit pipewire)
     (name "pipewire")
-    (version "0.3.43")
+    (version "0.3.49")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/PipeWire/pipewire")
+                    (url "https://gitlab.freedesktop.org/pipewire/pipewire.git")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0gp2h0sidapcqmnifl0iipdmbzb18bdh8zdi7pfywr9gsksh0cxy"))))
+                "1nm5in95318gw18prq4jfx5qrpkn22hvmkii7f40ngkcs3zrf5zj"))))
     (arguments
      '(#:configure-flags
        (list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
                             "/lib/udev/rules.d")
              "-Dsystemd=disabled"
-             "-Dsession-managers=[]")
+             "-Dsession-managers=[]"
+             "-Dsysconfdir=/etc") ; System-wide configuration in /etc/pipewire.
        #:phases
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
+    (native-inputs (modify-inputs (package-native-inputs pipewire)
+                     (prepend python-docutils))) ; For manpages.
     (inputs (modify-inputs (package-inputs pipewire)
+              ;; The libcamera plugin doesn't build with the current GStreamer
+              ;; version (g_memdup has to be replaced with g_memdup2 first).
               (prepend avahi
                        bluez
                        jack-2
                        ldacbt
-                       pulseaudio
+                       libfdk ; AAC Bluetooth codecs.
+                       libsndfile ; To build pw-cat.
+                       libusb ; Bluetooth quirks.
+                       lilv ; LV2 plugins.
+                       openssl ; For RAOP (AirPlay).
+                       pulseaudio ; PulseAudio integration.
+                       readline ; To buid pw-cli.
                        vulkan-loader
-                       vulkan-headers)))))
+                       vulkan-headers
+                       webrtc-audio-processing))))) ; For echo cancellation.
 
 (define-public wireplumber
   (package
K
K
Kevin Boulain wrote on 1 Apr 22:44 +0200
[PATCH 2/3] gnu: linux: update WirePlumber
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220401204441.8244-3-kevinboulain@gmail.com
* gnu/packages/linux.scm (wireplumber): Update to 0.4.9.
Set the sysconfigdir to /etc to allow configuring WirePlumber
system-wide.
---
gnu/packages/linux.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 40166ad36e..5b9b2d5ca5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8363,7 +8363,7 @@ (define-public pipewire-0.3
 (define-public wireplumber
   (package
     (name "wireplumber")
-    (version "0.4.6")
+    (version "0.4.9")
     (source
      (origin
        (method git-fetch)
@@ -8373,11 +8373,13 @@ (define-public wireplumber
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0g7xkgkjlxrhs49hqkwrjk2hb478gq55wwydafvvbsv78vsa7qfb"))))
+        (base32 "0m90ymkrrcqrgr3y8x6i6836w0m3anlrv2masww9050lw77aipak"))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags '("-Dsystemd=disabled"
-                           "-Dsystem-lua=true")))
+     `(#:configure-flags
+       '("-Dsystemd=disabled"
+         "-Dsystem-lua=true"
+         "-Dsysconfdir=/etc"))) ; System-wide configuration in /etc/wireplumber.
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
K
K
Kevin Boulain wrote on 1 Apr 22:44 +0200
[PATCH 3/3] gnu: rename pipewire to pipewire-0.2 and pipewire-0.3 to pipewire
(address . 54379@debbugs.gnu.org)(name . Kevin Boulain)(address . kevinboulain@gmail.com)
20220401204441.8244-4-kevinboulain@gmail.com
* gnu/packages/chromium.scm (ungoogled-chromium): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (weston): Change inputs from
pipewire to pipewire-0.2.
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Change inputs
from pipewire-0.3 to pipewire.
* gnu/packages/gnome.scm (mutter): Change native-inputs and inputs from
pipewire-0.3 to pipewire.
* gnu/packages/kde-systemtools.scm (krfb): Change inputs from
pipewire-0.3 to pipewire.
* gnu/packages/linux.scm (pipewire): Rename to pipewire-0.2.
* gnu/packages/linux.scm (pipewire-0.3): Rename to pipewire.
* gnu/packages/linux.scm (wireplumber): Change inputs from pipewire-0.3
to pipewire.
* gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Change inputs
from pipewire to pipewire-0.2.
* gnu/packages/video.scm (obs): Change inputs from pipewire-0.3 to
pipewire.
---
gnu/packages/chromium.scm | 2 +-
gnu/packages/freedesktop.scm | 6 +++---
gnu/packages/gnome.scm | 4 ++--
gnu/packages/kde-systemtools.scm | 2 +-
gnu/packages/linux.scm | 12 ++++++------
gnu/packages/telegram.scm | 2 +-
gnu/packages/video.scm | 2 +-
7 files changed, 15 insertions(+), 15 deletions(-)

Toggle diff (151 lines)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 7ef1e5ac1b..f60c9719fe 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -849,7 +849,7 @@ (define-public ungoogled-chromium
            opus+custom
            pango
            pciutils
-           pipewire-0.3
+           pipewire
            pulseaudio
            re2
            snappy
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 55bde8e705..b1248c466d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1120,7 +1120,7 @@ (define-public weston
        ("mtdev" ,mtdev)
        ("linux-pam" ,linux-pam)
        ("pango" ,pango)
-       ("pipewire" ,pipewire)
+       ("pipewire" ,pipewire-0.2)
        ("wayland-protocols" ,wayland-protocols)
        ("xorg-server-xwayland" ,xorg-server-xwayland)))
     (propagated-inputs
@@ -2313,7 +2313,7 @@ (define-public xdg-desktop-portal
        ("libportal" ,libportal)
        ("dbus" ,dbus)
        ("geoclue" ,geoclue)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("fuse" ,fuse)))
     (arguments
      `(#:phases
@@ -2442,7 +2442,7 @@ (define-public xdg-desktop-portal-wlr
                   grim
                   iniparser
                   libinih
-                  pipewire-0.3
+                  pipewire
                   slurp
                   wayland
                   wayland-protocols))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8ff59f084b..41b1a1c010 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7557,7 +7557,7 @@ (define-public mutter
        ;; theme to please libxcursor.
        ("adwaita-icon-theme" ,adwaita-icon-theme)
        ("libxcursor" ,libxcursor)       ;for XCURSOR_PATH
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("python" ,python)
        ("python-dbus" ,python-dbus)
        ("python-dbusmock" ,python-dbusmock)
@@ -7600,7 +7600,7 @@ (define-public mutter
        ("libxkbfile" ,libxkbfile)
        ("libxrandr" ,libxrandr)
        ("libxtst" ,libxtst)
-       ("pipewire" ,pipewire-0.3)
+       ("pipewire" ,pipewire)
        ("startup-notification" ,startup-notification)
        ("sysprof" ,sysprof)
        ("upower-glib" ,upower)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 3fab9089f3..205cd24e9d 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -254,7 +254,7 @@ (define-public krfb
            libxcb
            libxtst
            oxygen-icons ;; default icon set
-           pipewire-0.3
+           pipewire
            qtbase-5
            qtx11extras
            xcb-util-image
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5b9b2d5ca5..11ffe04c50 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8274,7 +8274,7 @@ (define-public inputattach
 types and interfaces and translates so that the X server can use them.")
     (license license:gpl2+)))
 
-(define-public pipewire
+(define-public pipewire-0.2
   (package
     (name "pipewire")
     (version "0.2.7")
@@ -8315,9 +8315,9 @@ (define-public pipewire
 of Linux application development.")
     (license license:lgpl2.0+)))
 
-(define-public pipewire-0.3
+(define-public pipewire
   (package
-    (inherit pipewire)
+    (inherit pipewire-0.2)
     (name "pipewire")
     (version "0.3.49")
     (source (origin
@@ -8340,9 +8340,9 @@ (define-public pipewire-0.3
        (modify-phases %standard-phases
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
-    (native-inputs (modify-inputs (package-native-inputs pipewire)
+    (native-inputs (modify-inputs (package-native-inputs pipewire-0.2)
                      (prepend python-docutils))) ; For manpages.
-    (inputs (modify-inputs (package-inputs pipewire)
+    (inputs (modify-inputs (package-inputs pipewire-0.2)
               ;; The libcamera plugin doesn't build with the current GStreamer
               ;; version (g_memdup has to be replaced with g_memdup2 first).
               (prepend avahi
@@ -8383,7 +8383,7 @@ (define-public wireplumber
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
-    (inputs (list dbus elogind glib lua pipewire-0.3))
+    (inputs (list dbus elogind glib lua pipewire))
     (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
     (synopsis "Session / policy manager implementation for PipeWire")
     (description "WirePlumber is a modular session / policy manager for
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 6c5efc50b9..4213ac6e4e 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -166,7 +166,7 @@ (define-public webrtc-for-telegram-desktop
           ("libxrandr" ,libxrandr)
           ("openssl" ,openssl)
           ("opus" ,opus)
-          ("pipewire" ,pipewire)
+          ("pipewire" ,pipewire-0.2)
           ("protobuf" ,protobuf)
           ("pulseaudio" ,pulseaudio)
           ("x11" ,libx11)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index dc05c0a222..a5298ccfac 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3429,7 +3429,7 @@ (define-public obs
       libxcomposite
       mbedtls-apache
       mesa
-      pipewire-0.3
+      pipewire
       pulseaudio
       qtbase-5
       qtsvg
M
M
Maxime Devos wrote on 2 Apr 18:19 +0200
Re: [PATCH 0/3] gnu: linux: update PipeWire & WirePlumber
6c7e822240f4bdd715401aa25b5f619711f6fff2.camel@telenet.be
Kevin Boulain schreef op vr 01-04-2022 om 22:44 [+0200]:
Toggle quote (5 lines)
> I assume you mean ./pre-inst-env guix size pipewire?
> store item                                                       total    self
> [...]
> Do you need the full output (where should I paste it)?

More concretely, I'm wondering what the impact is of the new inputs:

+ libfdk
+ libsndfile
+ libusb
+ lilv
+ openssl
+ readline
+ webrtc-audio-processing

What are their 'total self percentage' values?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkh3gxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7groAQCAC8EVbOvAEoXpF1khDmoOezUV
qM5G9UeJaEsnPhmmTAD/cPjaXiCr4R1BqgnH4gjdBFPxSE3CJAcNmsyj0ZnncgU=
=la4w
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 2 Apr 18:35 +0200
d423547707ad0b34a6787d1484b94542c9b7532d.camel@telenet.be
Kevin Boulain schreef op vr 01-04-2022 om 22:44 [+0200]:
Toggle quote (4 lines)
> I've no idea how that works on Guix, I assume it's not as simple as with other
> distributions where all libraries/plugins can be found in a single place (/lib).
> Do you have an example?

Maybe have a look at how audacity searches AUDACITY_MODULE_PATH and
'dlopen's things? Or BASH_LOADABLES_PATH.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkh7QhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hRGAPwMj1pad6Qav43yPn+eM4kPNHZ9
mw2I+B5OdQlkrUuyIAD/ZC/x0+Qb+a2OHnpY0PjtUUixMcXUeIizNAB/mNCSvgI=
=Hjl9
-----END PGP SIGNATURE-----


K
K
Kevin Boulain wrote on 2 Apr 20:33 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54379@debbugs.gnu.org)
CABaj1X_YXeVYN3cmwDexmKW8xjVR51xqJBpZpMuiOwtKQu2WZQ@mail.gmail.com
On Sat, 2 Apr 2022 at 18:19, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (4 lines)
> More concretely, I'm wondering what the impact is of the new inputs:
> [...]
> What are their 'total self percentage' values?

Right, so just to make sure we're on the same page:
- guix size pipewire before this patch:
- guix size pipewire after this patch:

Surprisingly there isn't that much of an increase (~5MiB). That's
because most of the new dependencies were already pulled in by
existing dependencies.
For example, PulseAudio was pulling libsndfile &
webrtc-audio-processing. Bluez was pulling readline. I traced one
OpenSSL use back to a ffmpeg plugin dependency (rav1e's rust-cargo-c,
it's also used by other things but the Graphviz graph is too big to
generate a visualization).

This leaves us with only these new dependencies (see diff):
libfdk-2.0.1 75.2 3.5 0.4%
libusb-1.0.24 72.1 0.4 0.0%
lilv-0.24.12 74.0 0.3 0.0%
serd-0.30.8 71.9 0.2 0.0%
sord-0.16.8 73.7 0.1 0.0%
sratom-0.6.6 73.7 0.1 0.0%
M
M
Maxime Devos wrote on 2 Apr 21:51 +0200
(name . Kevin Boulain)(address . kevinboulain@gmail.com)(address . 54379@debbugs.gnu.org)
b67233ae04d7ef08ad38c20418aeec5fb6af0353.camel@telenet.be
Kevin Boulain schreef op za 02-04-2022 om 20:33 [+0200]:
Toggle quote (4 lines)
> Surprisingly there isn't that much of an increase (~5MiB). That's
> because most of the new dependencies were already pulled in by
> existing dependencies.

Ok, that doesn't seem too bad.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkipSxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7k8ZAQC0jobJWi5iLWZ9xThYSQCaxHvq
s4PXuN8k4q7oofm1HwEAyS3snATs7MuWwnErC+1VpHENGhFW3Kll437w5ukT0wA=
=RwY0
-----END PGP SIGNATURE-----


?