Subject: bug#29536: closed (Re: [bug#29536] [PATCH] gnu: Add cava.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 25 Jan 2018 19:50:03 +0000

Your bug report

#29536: [PATCH] gnu: Add cava.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29536: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29536
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#29536] [PATCH] gnu: Add cava.
From: Oleg Pykhalov <[email-masked]>
To: [email-masked] (Ludovic Courtès)
Cc: [email-masked], [email-masked], ng0 <[email-masked]>
Date: Thu, 25 Jan 2018 22:49:07 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Ludovic,

Thank you for review!

[email-masked] (Ludovic Courtès) writes:

>>>>>From af48537fc5c6af11993db03004a937251d8d60e9 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <[email-masked]>
>> Date: Sat, 2 Dec 2017 22:36:36 +0300
>> Subject: [PATCH] gnu: Add cava.
>>
>> * gnu/packages/audio.scm (cava): New variable.
>
> [...]
>
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'bootstrap
>> +           (lambda _
>> +             (setenv "HOME" (getcwd))
>> +             (zero? (system* "sh" "autogen.sh"))))
>
> Please use ‘invoke’ instead of ‘system*’.

This is new.  OK, will use.  Thank you for notice!

>> +         (add-before 'build 'make-cava-ldflags
>> +           (lambda _ (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))))
>
> Please use:
>
>   (lambda* (#:key outputs #:allow-other-keys)
>     … outputs …)

Should be this?

    (lambda* (#:key outputs #:allow-other-keys)
      … (assoc-ref outputs "out") …)

>> +         (add-after 'install 'data
>> +           (lambda _ (for-each (lambda (file)
>> +                            (install-file file (string-append
>> +                                                (assoc-ref %outputs "out")
>> +                                                "/share/doc/examples")))
>> +                          (find-files "example_files")))))))
> Likewise.

OK.

>> +    (home-page "https://karlstav.github.io/cava/")
>> +    (synopsis "CLI audio visualizer for Alsa, MPD and Pulseaudio")
>
> Rather: “Console audio visualizer for ALSA, MPD, and PulseAudio”.

OK.

>> +    (description "@code{cava} provides a command line audio visualizer for
>> +MPD, Alsa and Pulseaudio.")
>
> Based on their README:
>
>   C.A.V.A. is a bar audio spectrum visualizer for the terminal using
>   ALSA, MPD, PulseAudio, or a FIFO buffer as its input.

OK.

> OK with these changes, thank you!

Pushed as c2c0d66162152b05fc42fdd1be5f07b9eca3bc66

Oleg.

Subject: [PATCH] gnu: Add cava.
From: Oleg Pykhalov <[email-masked]>
To: [email-masked]
Date: Sat, 02 Dec 2017 22:37:53 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

>From 972835bcf71b67d2bc12c3d7a6bb80f51f0d0efa Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <[email-masked]>
Date: Sat, 2 Dec 2017 22:36:36 +0300
Subject: [PATCH] gnu: Add cava.

* gnu/packages/audio.scm (cava): New variable.
---
 gnu/packages/audio.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index da9314392..347f379e3 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -3087,3 +3087,46 @@ mixers.")
 customized and extended using either the s7 Scheme implementation (included in
 the Snd sources), Ruby, or Forth.")
     (license (license:non-copyleft "file://COPYING"))))
+
+(define-public cava
+  (package
+    (name "cava")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/karlstav/cava/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1p24lz3h4d0h82ffylqr7mq8a8x1c66flm2r2bsv1liw51n1rma2"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (inputs
+     `(("fftw"       ,fftw)
+       ("ncurses"    ,ncurses)
+       ("pulseaudio" ,pulseaudio)))
+    (arguments
+     `(#:configure-flags
+       (list (string-append "PREFIX=" %output)
+             (string-append "FONT_DIR=" %output "/usr/share/consolefonts"))
+       #:make-flags ; Add $libdir to the RUNPATH of all the executables.
+       (let ((lib (string-append %output "/lib")))
+         (list (string-append "cava_LDFLAGS = -L" lib " -Wl,-rpath " lib)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'bootstrap
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (zero? (system* "sh" "autogen.sh"))))
+         (add-before 'build 'make-cava-ldflags
+           (lambda _ (mkdir-p (string-append (assoc-ref %outputs "out") "/lib")))))))
+    (home-page "https://karlstav.github.io/cava/")
+    (synopsis "CLI audio visualizer for Alsa, MPD and Pulseaudio")
+    (description "@code{cava} provides a command line audio visualizer for
+MPD, Alsa and Pulseaudio.")
+    (license license:expat)))
-- 
2.15.0