Hi Guix, Can anyone help me get my audio working?
I've been trying to "install" some configuration files for my audio setup on a Chromebook. On a normal GNU/Linux system, one installs them under /usr/share, but Guix doesn't have that, so I made a package based on alsa-ucm-conf.
But packaging the config files is not enough, it seems. You also have to modify alsa-lib, which efraim was kind enough to do last night.
But apparently, alsa-lib needs updated to support certain features of the config, so the attached Scheme code will not work. Can someone show me how to get it to work?
Thanks, Caleb Herbert
;; chromebook-alsa-lib.scm - Install Chromebook ALSA config ;; Copyright (C) 2023 Caleb Herbert <c...@bluehome.net> ;; Copyright (C) 2023 efraim ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see <https://www.gnu.org/licenses/>. (use-modules (guix packages) (guix utils) (guix git-download) (guix build-system copy) (guix build-system trivial) ((guix licenses) #:prefix license:) (gnu packages linux)) (define-public chromebook-ucm-conf (let ((commit "1328e46bfca6db2c609df9c68d37bb418e6fe279") (revision "1")) (package (name "chromebook-ucm-conf") (version (git-version "0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url (string-append "https://github.com/WeirdTreeThing/" name)) (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "1i9wi2z8izjg3xzkyya88lrxskcjdp4nig1qwjiy40vj0li20d0c")))) (build-system copy-build-system) (arguments '(#:install-plan '(("glk" "share/alsa/ucm2/conf.d") ("common" "share/alsa/ucm2")))) (home-page "https://github.com/WeirdTreeThing/chromebook-ucm-conf") (synopsis "Alsa UCM configuration for chrome devices") (description "A collection of modified ChromeOS UCM configuration files optimized for mainline Linux") (license license:bsd-3)))) (define alsa-bonus-inputs (package (name "alsa-bonus-inputs") (version (package-version alsa-lib)) (source #f) (build-system trivial-build-system) (arguments `(#:modules ((guix build union)) #:builder (begin (use-modules (ice-9 match) (guix build union)) (match %build-inputs (((names . directories) ...) (union-build (assoc-ref %outputs "out") directories) #t))))) (inputs (list alsa-ucm-conf alsa-topology-conf chromebook-ucm-conf)) (home-page "") (synopsis "") (description "") (license #f))) (define chromebook-alsa-lib (package (inherit alsa-lib) (arguments (substitute-keyword-arguments (package-arguments alsa-lib) ((#:phases phases) `(modify-phases ,phases (replace 'pre-install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((alsa (string-append (assoc-ref outputs "out") "/share/alsa")) (bonus-inputs (assoc-ref inputs "alsa-bonus-inputs")) (ucm (string-append bonus-inputs "/share/alsa/ucm")) (ucm2 (string-append bonus-inputs "/share/alsa/ucm2")) (topology (string-append bonus-inputs "/share/alsa/topology"))) (mkdir-p alsa) (symlink ucm (string-append alsa "/ucm")) (symlink ucm2 (string-append alsa "/ucm2")) (symlink topology (string-append alsa "/topology"))))))))) (inputs (modify-inputs (package-inputs alsa-lib) (prepend alsa-bonus-inputs) (delete "alsa-ucm-conf" "alsa-topology-conf"))))) chromebook-alsa-lib