From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: Add alsa-plugins. Date: Sat, 29 Oct 2016 23:35:51 +0200 Message-ID: <87r36yale0.fsf@elephly.net> References: <20161029144331.29451-1-ng0@we.make.ritual.n0.is> <20161029144331.29451-2-ng0@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0bIJ-00089l-9r for guix-devel@gnu.org; Sat, 29 Oct 2016 17:36:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0bIE-00051z-FB for guix-devel@gnu.org; Sat, 29 Oct 2016 17:36:03 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21303) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c0bID-00051g-UY for guix-devel@gnu.org; Sat, 29 Oct 2016 17:35:58 -0400 In-reply-to: <20161029144331.29451-2-ng0@we.make.ritual.n0.is> 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 ng0 writes: > * gnu/packages/linux.scm (alsa-plugins): New variable. Thanks! This patch doesn’t apply to current master here. Does it need rebasing? > +(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. > + (outputs '("out" "pulseaudio")) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-after 'install 'split > + (lambda* (#:key inputs outputs #:allow-other-keys) > + ;; Split the binaries to the various outputs. “Distribute” is probably better than “Split” here. > + (rename-file (string-append out "/share/alsa/alsa.conf.d/" > + "50-pulseaudio.conf") > + (string-append pua "/share/alsa/alsa.conf.d/" > + "50-pulseaudio.conf")) > + (rename-file (string-append out "/share/alsa/alsa.conf.d/" > + "99-pulseaudio-default.conf.example") > + (string-append pua "/share/alsa/alsa.conf.d/" > + "99-pulseaudio-default.conf.example")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_conf_pulse.la") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_conf_pulse.la")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_conf_pulse.so") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_conf_pulse.so")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_ctl_pulse.la") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_ctl_pulse.la")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_ctl_pulse.so") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_ctl_pulse.so")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_pcm_pulse.la") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_pcm_pulse.la")) > + (rename-file (string-append out "/lib/alsa-lib/" > + "libasound_module_pcm_pulse.so") > + (string-append pua "/lib/alsa-lib/" > + "libasound_module_pcm_pulse.so")) > + (delete-file-recursively (string-append out > "/share")))))))) That’s a bit crude. Can’t you use “find-files” with a pattern to find all files containing “pulse” and then use “for-each” to move all files? One more thing: could you check with “guix gc --references” to confirm that the separate outputs do not contain “bad” references? The “out” output should not contain a reference to “pulseaudio”, otherwise distributing binaries to outputs is pointless. > + (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 "Utilities 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 provides > +additional plugins.") “additional plugins” is a bit short. What do they do (in general), why would I want them? > + (license (list license:gpl2+ > + ;; `rate/rate_samplerate.c': LGPL v2.1 or later. > + license:lgpl2.1+)))) > + Could you please send an updated patch? ~~ Ricardo