From c2c0d66162152b05fc42fdd1be5f07b9eca3bc66 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 25 Jan 2018 22:42:53 +0300 Subject: gnu: Add cava. * gnu/packages/audio.scm (cava): New public variable. --- gnu/packages/audio.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 0046f9a73d..bd3d139efe 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2016 ng0 ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -3264,3 +3265,54 @@ the following features: transforms (FFTs) of the sound being played, as well as other graphical representations.") (license license:expat))) + +(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* (#:key outputs #:allow-other-keys) + (setenv "HOME" (getcwd)) + (invoke "sh" "autogen.sh"))) + (add-before 'build 'make-cava-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (mkdir-p (string-append (assoc-ref outputs "out") "/lib")))) + (add-after 'install 'data + (lambda* (#:key outputs #:allow-other-keys) + (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 "Console audio visualizer for ALSA, MPD, and PulseAudio") + (description "C.A.V.A. is a bar audio spectrum visualizer for the terminal +using ALSA, MPD, PulseAudio, or a FIFO buffer as its input.") + (license license:expat))) -- cgit v1.2.3