[PATCH] gnu: Add cli-visualizer.

  • Done
  • quality assurance status badge
Details
2 participants
  • Oleg Pykhalov
  • Ludovic Courtès
Owner
unassigned
Submitted by
Oleg Pykhalov
Severity
normal

Debbugs page

Oleg Pykhalov wrote 7 years ago
(address . guix-patches@gnu.org)
87h8t9ne67.fsf@gmail.com
From 54a00afb4e628019dbfe3f9b7f09a553dab3cfb9 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 2 Dec 2017 22:03:13 +0300
Subject: [PATCH] gnu: Add cli-visualizer.

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

Toggle diff (50 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index da9314392..6ca250f0c 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -3087,3 +3087,43 @@ 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 cli-visualizer
+ (package
+ (name "cli-visualizer")
+ (version "1.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/dpayne/cli-visualizer/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07zkm87f2fr8kc6531zrkya7q81sdanm6813y2f54mg13g41y6hi"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("fftw" ,fftw)
+ ("ncurses" ,ncurses)
+ ("pulseaudio" ,pulseaudio)
+ ("which" ,which)))
+ (arguments
+ '(#:tests? #f ; no tests
+ #:make-flags
+ (list (string-append "PREFIX=" %output "/bin/") "ENABLE_PULSE=1")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-sudo
+ (lambda _ (substitute* "install.sh" (("sudo") ""))))
+ (add-before 'install 'make-prefix
+ (lambda _ (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))))
+ (add-after 'install 'data
+ (lambda _ (for-each (lambda (file)
+ (install-file file "/share/doc"))
+ (list "asound_alsa.conf" "asound_alsa_with_dmix.conf"
+ "basic_colors" "blue" "config" "rainbow")))))))
+ (home-page "https://github.com/dpayne/cli-visualizer/")
+ (synopsis "CLI audio visualizer")
+ (description "@code{cli-visualizer} provides a command line audio
+visualizer for MPD, Alsa and Pulseaudio.")
+ (license license:expat)))
--
2.15.0
Oleg Pykhalov wrote 7 years ago
(name . bug#29535)(address . 29535@debbugs.gnu.org)
87shcsuutx.fsf@gmail.com
From 83d6e5b19813bc53a638f6fbbc007621a9a58648 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 2 Dec 2017 22:03:13 +0300
Subject: [PATCH] gnu: Add cli-visualizer.

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

Toggle diff (52 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index da9314392..3816cf98f 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -3087,3 +3087,45 @@ 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 cli-visualizer
+ (package
+ (name "cli-visualizer")
+ (version "1.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/dpayne/cli-visualizer/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07zkm87f2fr8kc6531zrkya7q81sdanm6813y2f54mg13g41y6hi"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("fftw" ,fftw)
+ ("ncurses" ,ncurses)
+ ("pulseaudio" ,pulseaudio)
+ ("which" ,which)))
+ (arguments
+ '(#:tests? #f ; no tests
+ #:make-flags
+ (list (string-append "PREFIX=" %output "/bin/") "ENABLE_PULSE=1")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-sudo
+ (lambda _ (substitute* "install.sh" (("sudo") ""))))
+ (add-before 'install 'make-prefix
+ (lambda _ (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))))
+ (add-after 'install 'data
+ (lambda _
+ (for-each (lambda (file)
+ (install-file file
+ (string-append (assoc-ref %outputs "out")
+ "/share/doc")))
+ (find-files "examples")))))))
+ (home-page "https://github.com/dpayne/cli-visualizer/")
+ (synopsis "CLI audio visualizer")
+ (description "@code{cli-visualizer} provides a command line audio
+visualizer for MPD, Alsa and Pulseaudio.")
+ (license license:expat)))
--
2.15.0
Ludovic Courtès wrote 7 years ago
Re: [bug#29535] [PATCH] gnu: Add cli-visualizer.
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 29535@debbugs.gnu.org)
877eu1cpgo.fsf@gnu.org
Oleg Pykhalov <go.wigust@gmail.com> skribis:

Toggle quote (7 lines)
>>From 54a00afb4e628019dbfe3f9b7f09a553dab3cfb9 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Sat, 2 Dec 2017 22:03:13 +0300
> Subject: [PATCH] gnu: Add cli-visualizer.
>
> * gnu/packages/audio.scm (cli-visualizer): New variable.

[...]

Toggle quote (6 lines)
> + (inputs
> + `(("fftw" ,fftw)
> + ("ncurses" ,ncurses)
> + ("pulseaudio" ,pulseaudio)
> + ("which" ,which)))

Most likely ‘which’ should be in ‘native-inputs’ (it’s not referred to
at run time, is it?).

Besides, I’d encourage you to not align inputs like this, for
consistency with the rest of the code, though that’s not that big a
deal. :-)

Toggle quote (11 lines)
> + (add-after 'unpack 'remove-sudo
> + (lambda _ (substitute* "install.sh" (("sudo") ""))))
> + (add-before 'install 'make-prefix
> + (lambda _ (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))))
> + (add-after 'install 'data
> + (lambda _ (for-each (lambda (file)
> + (install-file file "/share/doc"))
> + (list "asound_alsa.conf" "asound_alsa_with_dmix.conf"
> + "basic_colors" "blue" "config" "rainbow")))))))


Nitpick: please write the lambda’s body on a separate line, and make
sure each phase returns a Boolean:

(lambda _
(substitute* …)
#t)

Toggle quote (2 lines)
> + (synopsis "CLI audio visualizer")

s/CLI/Command-line/

Toggle quote (3 lines)
> + (description "@code{cli-visualizer} provides a command line audio
> +visualizer for MPD, Alsa and Pulseaudio.")

s/Alsa/ALSA/

It would be nice if you could clarify in the description what “audio
visualizer” means. Perhaps something like:

It can display fast-Fourier transforms (FFTs) of the sound being
played, as well as other graphical representations.

OK with these changes, thank you!

Ludo’.
Oleg Pykhalov wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87a7ypkm4j.fsf@gmail.com
Hello Ludovic,

Thank you for review!

ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (4 lines)
> [...]
>
> OK with these changes, thank you!

I applied all your notes and also found included tests in cli-visualizer

Pushed as adedbe95d4896c86c26b2b3ad8408e49f52e9796

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlou8/wACgkQckbhHGm3
lWmTKg/+LVVOfbt9LRUTVmqwutUbTA5uaiZevOPvmZ0WbPrX+MY3b9HUQH9mtY7L
VL2Ll6m4+mZCMJNLbO1eUVCztuKnpUiMEYuYdiDRVvO9el0JZtLGUvDsJVUJRvWU
E56cpSZQE4f6840bdRnYFrk7kBFe2ShUwm+G+XzFkIbFYSddrcC9IdEQQLRltjLg
iMq3rSXmEcqRfJeMjfklPLYFK3g68SOUUa0Ro2XJL9X2eXpxWL0yy93mH2gc9RQq
LkDGMklicIAxhHjcalU/7EjZPR7TPNCyeI30GBBpPP7AbRXLNBmfWa0ItQ0bIA2e
ceEcg3wQ8xjJEiVfKTUEmroZKVl78oSwbuap1VR4k22RihzxaiEtA4S8p0zKH5TF
aRh/RKnht14ITbq082pPgU/lbvVJayCg8o3WlioW7zimff5R14dhiaux9bO01QZD
2EfQK9iUCcsV62ri8zZ9JzFsZ4sReDMS5gSYHTmzUEIctyJY0aJuGxALaKrmuAbi
vu5EbhcGDIVY3bE0hu7GUWo1Ghoam9dHLMMb4Hjsl5iKVlUTrblcJSNh1HNMqsPN
RWvs11CEVBfoTOw57ZcHpATu5+PDGhNraXfQz6hVwVPTb6d15mKbePICEinoyb0m
UVBXw5HSYK1MYy9CBiyQu2hNuAG09E92aMHXG5TuT4uo+jlhRoQ=
=X2aO
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 29535@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 29535
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help