Subject: [bug#53676] [PATCH 3/5] gnu: pulseaudio: Graft to adjust configuration.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 31 Jan 2022 23:19:31 -0500

* gnu/packages/pulseaudio.scm (pulseaudio/fixed): New variable.
(pulseaudio)[replacement]: Graft package with it.
---
 gnu/packages/pulseaudio.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index fe028b5202..f529717ee1 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -178,6 +178,7 @@ (define-public libsamplerate
 (define-public pulseaudio
   (package
     (name "pulseaudio")
+    (replacement pulseaudio/fixed)
     (version "15.0")
     (source (origin
              (method url-fetch)
@@ -269,6 +270,23 @@ (define-public pulseaudio
     ;; 'LICENSE' for details.
     (license l:gpl2+)))
 
+(define pulseaudio/fixed
+  (package
+    (inherit pulseaudio)
+    (arguments
+     (substitute-keyword-arguments (package-arguments pulseaudio)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'customize-default-script
+             (lambda _
+               (call-with-port
+                (open-file "src/daemon/default.pa.in" "a")
+                (lambda (port)
+                  (format port "~%\
+### Include extra script files configured via the pulseaudio-service-type.
+.nofail
+.include /etc/pulse/default.pa.d~%")))))))))))
+
 (define-public pavucontrol
   (package
     (name "pavucontrol")
-- 
2.34.0