From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: Re: [PATCH] gnu: Add alsa-plugins. Date: Mon, 19 Dec 2016 12:59:52 -0500 Message-ID: <87h95z3ilj.fsf@openmailbox.org> References: <87r36yale0.fsf@elephly.net> <20161031143958.24208-1-ng0@we.make.ritual.n0.is> <20161031143958.24208-2-ng0@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ2EW-0001a3-Dh for guix-devel@gnu.org; Mon, 19 Dec 2016 13:00:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ2ET-0003A2-Ba for guix-devel@gnu.org; Mon, 19 Dec 2016 13:00:20 -0500 Received: from mail2.openmailbox.org ([62.4.1.33]:43598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJ2ES-00039W-Uv for guix-devel@gnu.org; Mon, 19 Dec 2016 13:00:17 -0500 In-Reply-To: <20161031143958.24208-2-ng0@we.make.ritual.n0.is> (ng0@we.make.ritual.n0.is's message of "Mon, 31 Oct 2016 14:39:58 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ng0 writes: > * gnu/packages/linux.scm (alsa-plugins): New variable. > --- > gnu/packages/linux.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 63 insertions(+) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index 8f0a9ab..3b20c95 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -15,6 +15,7 @@ > ;;; Copyright =C2=A9 2016 Ricardo Wurmus > ;;; Copyright =C2=A9 2016 David Craven > ;;; Copyright =C2=A9 2016 John Darrington > +;;; Copyright =C2=A9 2016 ng0 > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -69,6 +70,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) > @@ -869,6 +872,66 @@ MIDI functionality to the Linux-based operating syst= em.") > ;; GPLv2-only. > (license license:gpl2))) >=20=20 > +(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")) > + (outlib (string-append out "/lib/alsa-lib")) > + (outconf (string-append out "/share/alsa/alsa.conf.d= ")) > + (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) > + (for-each (lambda (file) > + (rename-file file (string-append puaconf "/" = file))) > + (find-files out ".*\\.(conf|example)")) > + (for-each (lambda (file) > + (rename-file file (string-append pualib "/" f= ile))) > + (find-files out ".*pulse\\.(la|so)")) > + (delete-file-recursively (string-append out "/share"))) > + #t))))) "find-files" is returning the entire path to the files, so "rename-file" sees the files' destination as "/gnu/store/.../gnu/store...destination-file". You need to adjust find-files accordingly, perhaps by changing into the directory to be copied from first and then calling "find-files" from the current directory ".". Hope that makes sense. :-) > + (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 en= hances ALSA > +by providing additional plugins which include: upmixing, downmixing, jac= kd 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") --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlhYIBkACgkQ5qXuPBlG eg1rGg//adpmcRnSrHK60OVYQeB7YCgrcf3DlV+Utx/sslmzbpCiTbIKQxvGI9Zg T3i115G+Z/ZEEIKyP/OXa8yLMFxgsngrgMiO53BxMQYxeefXjf55pY7g8r8DIoA2 XxrC5/eJ8Hx0x2KRc482HE5Ql4DnhPWLtBW93pRN5f4OdT1HoNucxWowm5RwniV2 rEkZx1XYYSvFTQMmYTKyuSOqtmfoOqBunjyyfjhS8f32OH28frcBcqbfkZikvSPL 5XB9BEFAlvkYMB1nIk34thtiibYPntA/bDHGKK4OHKxmIxFK5Qd9eNmzZ2yIduQp f6ezCIzkGIbfb2wOC86VzBiDsEjunQrb0S3WMeI9Q1KQCayorDhwswggaG8D+K2T JasbwyjV0d1ZDpT73zrEoiTs1mqCuLIWGqGhBZ2pySy448n2fSyjyMMCnMR7Nu9w Ob3JMEt1ka8eyqnopZYspBREPIaZnTXyZXFnYhx/BHHvFdrLPy3FpzrJZ1koKMdU Bfq3JI7ribNU8h+CLPIf0SMsu212ugqJC3foAYjrOOfRA9BK4Cw96EQWtkzhwV0u i0PTwiNv5fvbUjqKs5HS+uWym5fbXUPHaGs8b9A2RLMVqpVsh132/fRJ7F1v9Q6M jJ2iTKrdOtFsR34RbSIMZmmrHTjc1ZKrYq8D/tlK/yugwlJMk/w= =UTWn -----END PGP SIGNATURE----- --=-=-=--