diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 0f727a6e9e..c828be546b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3836,7 +3836,52 @@ 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" + ,(package + (inherit alsa-lib) + (arguments `(,@(cons + (car (package-arguments alsa-lib)) + (list (append + (cadr + (package-arguments alsa-lib)) + (list (string-append + "--with-plugin-dir=" + ;; stuff goes here + )))))))) + ) + ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio"))))) ("pulseaudio" ,pulseaudio) ("libx11" ,libx11) ("freetype" ,freetype)