aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@we.make.ritual.n0.is>2016-12-20 14:53:31 +0000
committerKei Kebreau <kei@openmailbox.org>2016-12-20 10:22:06 -0500
commit7d2511bc6b467c056e7e0bcb0760f7b9652ba083 (patch)
tree8249c3867b0f5e18b501faa831045337a4031753
parent3a35070c50696c65b93c589da44866c5cf5f191c (diff)
downloadpatches-7d2511bc6b467c056e7e0bcb0760f7b9652ba083.tar
patches-7d2511bc6b467c056e7e0bcb0760f7b9652ba083.tar.gz
gnu: Add alsa-plugins.
* gnu/packages/linux.scm (alsa-plugins): New variable. Signed-off-by: Kei Kebreau <kei@openmailbox.org>
-rw-r--r--gnu/packages/linux.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 827ee8b37c..78fab4e186 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,6 +73,8 @@
#:use-module (gnu packages slang)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
@@ -894,6 +897,68 @@ MIDI functionality to the Linux-based operating system.")
;; GPLv2-only.
(license license:gpl2)))
+(define-public alsa-plugins
+ (package
+ (name "alsa-plugins")
+ (version "1.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f"))))
+ (build-system gnu-build-system)
+ ;; TODO: Split libavcodec and speex if possible. It looks like they can not
+ ;; be split, there are references to both in files.
+ ;; TODO: Remove OSS related plugins, they add support to run native
+ ;; ALSA applications on OSS however we do not offer OSS and OSS is
+ ;; obsolete.
+ (outputs '("out" "pulseaudio"))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'split
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Distribute the binaries to the various outputs.
+ (let* ((out (assoc-ref outputs "out"))
+ (pua (assoc-ref outputs "pulseaudio"))
+ (pualib (string-append pua "/lib/alsa-lib"))
+ (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
+ (mkdir-p puaconf)
+ (mkdir-p pualib)
+ (chdir (string-append out "/share"))
+ (for-each (lambda (file)
+ (rename-file file (string-append puaconf "/" (basename file))))
+ (find-files out "\\.(conf|example)"))
+ (for-each (lambda (file)
+ (rename-file file (string-append pualib "/" (basename file))))
+ (find-files out ".*pulse\\.(la|so)"))
+ (chdir "..")
+ ;; We have moved the files to output pulsaudio, the
+ ;; directory is now empty.
+ (delete-file-recursively (string-append out "/share"))
+ #t))))))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("speex" ,speex) ; libspeexdsp resampling plugin
+ ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
+ ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
+ ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://www.alsa-project.org/")
+ (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
+ (description
+ "The Advanced Linux Sound Architecture (ALSA) provides audio and
+MIDI functionality to the Linux-based operating system. This package enhances ALSA
+by providing additional plugins which include: upmixing, downmixing, jackd and
+pulseaudio support for native alsa applications, format conversion (s16 to a52), and
+external rate conversion.")
+ (license (list license:gpl2+
+ ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
+ license:lgpl2.1+))))
+
(define-public iptables
(package
(name "iptables")