summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-04-22 11:40:25 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-05-13 17:31:19 +0200
commit1bde05c6e882e7efb82e8b9bd863ea839d902aae (patch)
treea4e20530cf07f9ee4410f7c6136478553ee7ef4b /gnu
parent4002e0dfc42fb115b9fb2479e4a5308844d8d489 (diff)
downloadguix-1bde05c6e882e7efb82e8b9bd863ea839d902aae.tar.gz
gnu: alsa-lib: Use alsa-ucm-conf and alsa-topology-conf.
* gnu/packages/linux.scm (alsa)[arguments]: Add a pre-install phase that
creates symlinks to alsa-ucm-conf and alsa-topology-conf files.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/linux.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2d992e2a9d..39cb2279db 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2246,7 +2246,31 @@ configuration files that can be used for specific audio hardware.")
     (arguments
      '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                               (assoc-ref %outputs "out")
-                                              "/lib"))))
+                                              "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'pre-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((ucm
+                     (string-append (assoc-ref inputs "alsa-ucm-conf")))
+                    (topology
+                     (string-append (assoc-ref inputs "alsa-topology-conf")))
+                    (alsa
+                     (string-append (assoc-ref outputs "out") "/share/alsa"))
+                    (ucm-share
+                     (string-append ucm "/share/alsa/ucm"))
+                    (ucm2-share
+                     (string-append ucm "/share/alsa/ucm2"))
+                    (topology-share
+                     (string-append topology "/share/alsa/topology")))
+               (mkdir-p alsa)
+               (symlink ucm-share (string-append alsa "/ucm"))
+               (symlink ucm2-share (string-append alsa "/ucm2"))
+               (symlink topology-share (string-append alsa "/topology")))
+             #t)))))
+    (inputs
+     `(("alsa-ucm-conf" ,alsa-ucm-conf)
+       ("alsa-topology-conf" ,alsa-topology-conf)))
     (home-page "https://www.alsa-project.org/")
     (synopsis "The Advanced Linux Sound Architecture libraries")
     (description