unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add alsa-plugins.
  2016-10-29 12:09 [PATCH]: alsa-plugins ng0
@ 2016-10-29 12:09 ` ng0
  2016-10-29 12:20   ` ng0
  0 siblings, 1 reply; 11+ messages in thread
From: ng0 @ 2016-10-29 12:09 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/linux.scm (alsa-plugins): New variable.
---
 gnu/packages/linux.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 934a67f..ea680da 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; 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 (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -867,6 +870,36 @@ 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)
+    (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.")
+    (license (list license:gpl2+
+                   ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
+                   license:lgpl2.1+))))
+
 (define-public iptables
   (package
     (name "iptables")
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] gnu: Add alsa-plugins.
  2016-10-29 12:09 ` [PATCH] gnu: Add alsa-plugins ng0
@ 2016-10-29 12:20   ` ng0
  0 siblings, 0 replies; 11+ messages in thread
From: ng0 @ 2016-10-29 12:20 UTC (permalink / raw)
  To: guix-devel

ng0 <ng0@we.make.ritual.n0.is> writes:

> * gnu/packages/linux.scm (alsa-plugins): New variable.
> ---
>  gnu/packages/linux.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 934a67f..ea680da 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -15,6 +15,7 @@
>  ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
>  ;;; Copyright © 2016 David Craven <david@craven.ch>
>  ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
> +;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
>  ;;;
>  ;;; 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 (guix build-system cmake)
>    #:use-module (guix build-system gnu)
> @@ -867,6 +870,36 @@ 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)
> +    (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)")
                  ^__ can the commiting person change this to
                  Plugins for the Advanced … ?
> +    (description
> +     "The Advanced Linux Sound Architecture (ALSA) provides audio and
> +MIDI functionality to the Linux-based operating system.  This package provides
> +additional plugins.")
> +    (license (list license:gpl2+
> +                   ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
> +                   license:lgpl2.1+))))
> +
>  (define-public iptables
>    (package
>      (name "iptables")

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] alsa-plugins , revision 2
@ 2016-10-29 14:43 ng0
  2016-10-29 14:43 ` [PATCH] gnu: Add alsa-plugins ng0
  0 siblings, 1 reply; 11+ messages in thread
From: ng0 @ 2016-10-29 14:43 UTC (permalink / raw)
  To: guix-devel

This adds "alsa-plugins" with outputs: out, pulseaudio.
The other files keep cross-references (speex+a52 in one file for example), so they can not be separated.
If I am wrong about this, please comment. Otherwise I commented this in the patch already.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] gnu: Add alsa-plugins.
  2016-10-29 14:43 [PATCH] alsa-plugins , revision 2 ng0
@ 2016-10-29 14:43 ` ng0
  2016-10-29 21:35   ` Ricardo Wurmus
  0 siblings, 1 reply; 11+ messages in thread
From: ng0 @ 2016-10-29 14:43 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/linux.scm (alsa-plugins): New variable.
---
 gnu/packages/linux.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 934a67f..2448250 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; 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 (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -867,6 +870,82 @@ 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.
+    (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.
+             (let* ((out (assoc-ref outputs "out"))
+                    (pua (assoc-ref outputs "pulseaudio")))
+               (mkdir-p (string-append pua "/share/alsa/alsa.conf.d/"))
+               (mkdir-p (string-append pua "/lib/alsa-lib"))
+               (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"))))))))
+    (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.")
+    (license (list license:gpl2+
+                   ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
+                   license:lgpl2.1+))))
+
 (define-public iptables
   (package
     (name "iptables")
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] gnu: Add alsa-plugins.
  2016-10-29 14:43 ` [PATCH] gnu: Add alsa-plugins ng0
@ 2016-10-29 21:35   ` Ricardo Wurmus
  2016-10-31 14:39     ` [PATCH] alsa-plugins, revision 3 ng0
  0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Wurmus @ 2016-10-29 21:35 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


ng0 <ng0@we.make.ritual.n0.is> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] alsa-plugins, revision 3
  2016-10-29 21:35   ` Ricardo Wurmus
@ 2016-10-31 14:39     ` ng0
  2016-10-31 14:39       ` [PATCH] gnu: Add alsa-plugins ng0
  0 siblings, 1 reply; 11+ messages in thread
From: ng0 @ 2016-10-31 14:39 UTC (permalink / raw)
  To: guix-devel

I tried to debug what's faulty about the two for-each here, but I don't find it.

Help welcome :)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] gnu: Add alsa-plugins.
  2016-10-31 14:39     ` [PATCH] alsa-plugins, revision 3 ng0
@ 2016-10-31 14:39       ` ng0
  2016-12-19 17:59         ` Kei Kebreau
  0 siblings, 1 reply; 11+ messages in thread
From: ng0 @ 2016-10-31 14:39 UTC (permalink / raw)
  To: guix-devel

* 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 © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; 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 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"))
+                    (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 "/" file)))
+                         (find-files out ".*pulse\\.(la|so)"))
+               (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")
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] gnu: Add alsa-plugins.
  2016-10-31 14:39       ` [PATCH] gnu: Add alsa-plugins ng0
@ 2016-12-19 17:59         ` Kei Kebreau
  2016-12-20 14:53           ` alsa-plugins, new version of patch ng0
  0 siblings, 1 reply; 11+ messages in thread
From: Kei Kebreau @ 2016-12-19 17:59 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4736 bytes --]

ng0 <ng0@we.make.ritual.n0.is> 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 © 2016 Ricardo Wurmus <rekado@elephly.net>
>  ;;; Copyright © 2016 David Craven <david@craven.ch>
>  ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
> +;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
>  ;;;
>  ;;; 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 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"))
> +                    (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 "/" file)))
> +                         (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 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")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* alsa-plugins, new version of patch
  2016-12-19 17:59         ` Kei Kebreau
@ 2016-12-20 14:53           ` ng0
  2016-12-20 14:53             ` [PATCH] gnu: Add alsa-plugins ng0
  2016-12-20 15:52             ` alsa-plugins, new version of patch Kei Kebreau
  0 siblings, 2 replies; 11+ messages in thread
From: ng0 @ 2016-12-20 14:53 UTC (permalink / raw)
  To: guix-devel


Thanks Kei for catching this mistake. I tried to solve it with a directory-excursion, but ended up using chdir and removed the dedicated phase to delete the empty dir, as deleting the directory to me is a closure/finishing touch to the split phase.
Any objections, further comments or can this be added now?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] gnu: Add alsa-plugins.
  2016-12-20 14:53           ` alsa-plugins, new version of patch ng0
@ 2016-12-20 14:53             ` ng0
  2016-12-20 15:52             ` alsa-plugins, new version of patch Kei Kebreau
  1 sibling, 0 replies; 11+ messages in thread
From: ng0 @ 2016-12-20 14:53 UTC (permalink / raw)
  To: guix-devel; +Cc: ng0

From: ng0 <ng0@we.make.ritual.n0.is>

* gnu/packages/linux.scm (alsa-plugins): New variable.
---
 gnu/packages/linux.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 827ee8b37..78fab4e18 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")
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: alsa-plugins, new version of patch
  2016-12-20 14:53           ` alsa-plugins, new version of patch ng0
  2016-12-20 14:53             ` [PATCH] gnu: Add alsa-plugins ng0
@ 2016-12-20 15:52             ` Kei Kebreau
  1 sibling, 0 replies; 11+ messages in thread
From: Kei Kebreau @ 2016-12-20 15:52 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

ng0 <ng0@libertad.pw> writes:

> Thanks Kei for catching this mistake. I tried to solve it with a
> directory-excursion, but ended up using chdir and removed the
> dedicated phase to delete the empty dir, as deleting the directory to
> me is a closure/finishing touch to the split phase.
> Any objections, further comments or can this be added now?

LGTM. Pushed as 7d2511bc6b467c056e7e0bcb0760f7b9652ba083.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-12-20 15:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-29 14:43 [PATCH] alsa-plugins , revision 2 ng0
2016-10-29 14:43 ` [PATCH] gnu: Add alsa-plugins ng0
2016-10-29 21:35   ` Ricardo Wurmus
2016-10-31 14:39     ` [PATCH] alsa-plugins, revision 3 ng0
2016-10-31 14:39       ` [PATCH] gnu: Add alsa-plugins ng0
2016-12-19 17:59         ` Kei Kebreau
2016-12-20 14:53           ` alsa-plugins, new version of patch ng0
2016-12-20 14:53             ` [PATCH] gnu: Add alsa-plugins ng0
2016-12-20 15:52             ` alsa-plugins, new version of patch Kei Kebreau
  -- strict thread matches above, loose matches on Subject: below --
2016-10-29 12:09 [PATCH]: alsa-plugins ng0
2016-10-29 12:09 ` [PATCH] gnu: Add alsa-plugins ng0
2016-10-29 12:20   ` ng0

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).