@@ -3836,7 +3836,40 @@ programmers to access a standard API to open and decompress media files.")
("hunspell" ,hunspell)
("mesa" ,mesa)
("libass" ,libass)
- ("alsa-lib" ,alsa-lib)
+ ("alsa-lib-with-pulseaudio-plugin"
+ ,(package
+ (inherit alsa-lib)
+ (name "alsa-lib-with-pulseaudio-plugin")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build union)
+ (guix build utils))
+ #:builder
+ (begin
+ (use-modules (ice-9 match)
+ (guix build union)
+ (guix build utils))
+ (let ((out (assoc-ref %outputs "out"))
+ (alsa-lib (assoc-ref %build-inputs "alsa-lib")))
+ (match %build-inputs
+ (((names . directories) ...)
+ (union-build out
+ directories
+ ;; Instead of a symlink union, this is will be a
+ ;; copy union, because this won't "Just Work™"
+ ;; with mere symlinks. Some of the files that make
+ ;; up the union need to tweaked to work properly.
+ #:create-all-directories? #t
+ #:symlink copy-file)))
+ ;; Fix alsa-lib pkg-config file to point to the /gnu/store of
+ ;; this union, rather than that of alsa-lib itself.
+ (substitute* (string-append out "/lib/pkgconfig/alsa.pc")
+ ((alsa-lib) out))
+ #t))))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio")))))
("pulseaudio" ,pulseaudio)
("libx11" ,libx11)
("freetype" ,freetype)