diff mbox series

[bug#43628] Progress (?)

Message ID CAFw+=j190xYV93tWTMPPZst8qZ8sqfDexycZvgTn1G6X0tutjw@mail.gmail.com
State New
Headers show
Series [bug#43628] Progress (?) | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Prafulla Giri Sept. 26, 2020, 9:51 a.m. UTC
So, there were a few issues with my union. I've fixed them. Attached is the
diff as it stands right now.
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 0f727a6e9e..9a6a768af2 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -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)