guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#29536] [PATCH] gnu: Add cava.


From: Oleg Pykhalov
Subject: [bug#29536] [PATCH] gnu: Add cava.
Date: Sun, 03 Dec 2017 10:34:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

>From af48537fc5c6af11993db03004a937251d8d60e9 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <address@hidden>
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 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index da9314392..97de6b024 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -3087,3 +3087,52 @@ 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
+       (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"))))
+         (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")))))))
+    (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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]