[PATCH] gnu: Add cava.

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

Debbugs page

Oleg Pykhalov wrote 7 years ago
(address . guix-patches@gnu.org)
87efocor8u.fsf@gmail.com
From 972835bcf71b67d2bc12c3d7a6bb80f51f0d0efa Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
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(+)

Toggle diff (53 lines)
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
Oleg Pykhalov wrote 7 years ago
[PATCH] squash! gnu: Add cava.
(name . bug#29536)(address . 29536@debbugs.gnu.org)
87bmjgor3x.fsf@gmail.com
From a9d052f3ef8abcb830f279a09d99c9b6e7a0ad02 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 2 Dec 2017 22:39:01 +0300
Subject: [PATCH] squash! gnu: Add cava.

---
gnu/packages/audio.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 347f379e3..e4481281f 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -3105,7 +3105,7 @@ the Snd sources), Ruby, or Forth.")
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
- ("libtool" ,libtool)))
+ ("libtool" ,libtool)))
(inputs
`(("fftw" ,fftw)
("ncurses" ,ncurses)
@@ -3114,7 +3114,7 @@ the Snd sources), Ruby, or Forth.")
`(#: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.
+ #:make-flags
(let ((lib (string-append %output "/lib")))
(list (string-append "cava_LDFLAGS = -L" lib " -Wl,-rpath " lib)))
#:phases
--
2.15.0
ng0 wrote 7 years ago
Re: [bug#29536] [PATCH] gnu: Add cava.
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 29536@debbugs.gnu.org)
20171202220708.cg6xnqca7ovul5ng@abyayala
Hi,

which patch would someone review? Aren't they supposed to be one patch?
We don't have cava (as you are obviously adding it) and the 2nd patch
makes a change to cava.
We try to logically group patches, and this is a case where having it
in one patch makes sense, when a new package is getting added.

Oleg Pykhalov transcribed 2.4K bytes:
Toggle quote (69 lines)
> From 972835bcf71b67d2bc12c3d7a6bb80f51f0d0efa Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> 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
>
>
>
>
>

--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlojJAsACgkQ4i+bv+40
hYi4Rw//SAqGnT08mY9dyPzX9P2K/arEwcaj+hCJfMfA0SdCj3+PZ0xlfeWVVd1t
1E03/ztZTvpX3mMWdjhYF+fAc/u5xk8j5x87qSr9bV3+XW6WfmAtvHp7APvAv3wY
KOO2vOQJ6S4N5pzvqT+8RlZSTkaS/r6ddsfpR61foY+feWNjfBDxc/1P0lShqVf+
2CSPVV3+0rxywET9DCuKn+/ei++fyQYIQzJWfe+xvad0Tj7dKQ8z78uO0Lg5wo8E
X5Wam4QjNUUfKHo61dBEYuXcLN76Z08bAdgzJqF1I8wcpvg2BVMf8G3l/EhmlhKS
UQSn5lOAZqt25RM319px5Yrj5SNlmnc8ULa5evatfw9RVUZSlBoYv+r8ybHSdFMu
9Y+jTYFQPtXu2AWMl2CrNtvF3WoLuSAx6v5cgs73+4ibU5Ci42q2yio6k8lpXdh9
88wccSyJxDPhd+KFnD4oomiZOTPrr+XVZrUiAehMDv+SgpO/jhHefScx0B0ZksjI
dnpi5AqW+1bnK8lSX+xOAUd2r59uv1LSqa0hFXF++Uc5w9e2aH140N1Jmyd5xyop
bfxfnrpjsCQAsH1tK98EK8c/wLoK6kqZCeUJWDWrTEMbjQeX4aSKuoKFcZ1949UG
f9RwdfyMPUCLHQ64Sy+IwNgkIyQjO+U20XAIDUqgzk82WSi4vUs=
=fcnn
-----END PGP SIGNATURE-----


Oleg Pykhalov wrote 7 years ago
(name . ng0)(address . ng0@n0.is)(address . 29536@debbugs.gnu.org)
871skcwabh.fsf@gmail.com
Hello ng0,

ng0 <ng0@n0.is> writes:

Toggle quote (6 lines)
> which patch would someone review? Aren't they supposed to be one patch?
> We don't have cava (as you are obviously adding it) and the 2nd patch
> makes a change to cava.
> We try to logically group patches, and this is a case where having it
> in one patch makes sense, when a new package is getting added.

[...]

Sorry for that. The second patch are just minor things (indent and
remove missleading comment). It expected to be squashed as patch's
message says.


I also think about adding an example of configuration from origin

cava unlike cli-visualizer creates a configuration file for the first
time, but it's empty and useless without example or documentation.


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

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlojpMIACgkQckbhHGm3
lWmYXhAAw17brd8kwUC/xTs0sil5qtkxkbGjFtx7VkTey1ekXYLQ2QNeY5xjFy1n
nCothcFCOocQZBMlWOoXDjD8EptW4PQ160oRBQdCpplobP6/eBLL45DJE0fDL/OG
t+41VQb++lBl9UB3Q1WBgz1Nv/QY4sAis+Q9yNWkjrPXo2uy5ujGkhb1BqJ91Dvt
Ub0WDWW/KCQxSa3D0N6C1ibZOJ0HDWnGWTbQWkO6bgHVjlTuHU63i3YsTevbvIKY
bfAONOlNFm1WNP5y0USE5kr4ndA6fKUZKsjzcAFrqUVp2vvMuXJ8ciUBQvEqBjne
D0LyI+r7A9mJoYcCEBaJCfbKY2+y1KN3JzrRUm6UCEMS9YtOhkU+t1DOne4Gi6OQ
NwEEbKjhQMl8mELgBK8AjzC7Ae4twytLF13NtuJIxsvVnhHvN6MFpMpqJHjyIMNy
o1YHPRodJmBjJfyREYCxcSSft745qNhkIVCZ/Uz4FX2nFDLWyyYI5HgUouGQqX0G
JcN1uF7EptlEwwNjUSWDs6V50hfAasjyTx7EZ1w33ppcuet0WNkgkM7Wc+4dbu4G
7WuTQSXlrhUGv5tztl97981f+ZXOoFyT+iSku8XZom/8RQQG5Od+dj5S9VJHanio
f/sNsoL/cEJl5iiWOOsqSwgr0VpK0XBAJpIU64GoWyYhtDFe2t4=
=CKsT
-----END PGP SIGNATURE-----

Oleg Pykhalov wrote 7 years ago
(name . ng0)(address . ng0@n0.is)(address . 29536@debbugs.gnu.org)
87wp24uux2.fsf@gmail.com
From af48537fc5c6af11993db03004a937251d8d60e9 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
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(+)

Toggle diff (59 lines)
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
Ludovic Courtès wrote 7 years ago
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87o9lph0fh.fsf@gnu.org
Heya Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

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

[...]

Toggle quote (6 lines)
> + (modify-phases %standard-phases
> + (add-after 'unpack 'bootstrap
> + (lambda _
> + (setenv "HOME" (getcwd))
> + (zero? (system* "sh" "autogen.sh"))))

Please use ‘invoke’ instead of ‘system*’.

Toggle quote (3 lines)
> + (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 …)

Toggle quote (7 lines)
> + (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.

Toggle quote (3 lines)
> + (synopsis "CLI audio visualizer for Alsa, MPD and Pulseaudio")

Rather: “Console audio visualizer for ALSA, MPD, and PulseAudio”.

Toggle quote (3 lines)
> + (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 with these changes, thank you!

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

Thank you for review!

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

Toggle quote (17 lines)
>>>>From af48537fc5c6af11993db03004a937251d8d60e9 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> 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!

Toggle quote (8 lines)
>> + (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") …)

Toggle quote (8 lines)
>> + (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.

Toggle quote (5 lines)
>> + (synopsis "CLI audio visualizer for Alsa, MPD and Pulseaudio")
>
> Rather: “Console audio visualizer for ALSA, MPD, and PulseAudio”.

OK.

Toggle quote (8 lines)
>> + (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.

Toggle quote (2 lines)
> OK with these changes, thank you!

Pushed as c2c0d66162152b05fc42fdd1be5f07b9eca3bc66

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

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlpqNLMACgkQckbhHGm3
lWmvdxAAj06PaWR9Cb+juqLoEcfkJcweKQh/HPdBS9UZi68Uu4aXSIYtl+7tWWMk
a8j1QJebFVUZnbOmo2uyMbQZzCKdvRPhRtSB/mWmL1EsODTx3Rc3NPJv9il/Zcxe
JUv88okmNqdlm48FXsBK3tMjZqekAVwauj8jbliz5DfoCteTXSE9aqt2tb3kM0Yk
q8qbcTJpK7sOmrzMBOPZisOyWd7id8p7xL+yADfuV5ydEjFKTqCke2w0HGRiSDPB
U7GEZcqo4zc8anx6aaPh2eBunXHwKeO/i5iBotSQcvhxNOCmCiFqBqwDdWYiOZlh
97RLvi0G+5M7tzkZ8X5fuEmBfAKBdAp2CGRng/RixhVoR6uRuRQ5zREMpXU2nZxW
su1eH/wx0tzAzL5tYwYhj/3qmCPORTR1dfwEuwBySZFlFTDzEf9MLQKwjunlBorh
DVAjqKwSkCvM8uDwsv6geIU46VN+6bYGJTFtkswAcRvyhPk/bKvQIy853CzHt5Ws
b9IDkGc2jE9fJpazzX0TeCA2kvQJ2AhXbqf+t5BS1XLpbGpxf5Xbs8xeUjaM4n9r
WWKlSXdsQPYIdI/PLe3ojxTY33YZmEsWDzfOqXdc5q6Rrtrf+broEdxEVBikI3oE
yaRDnX9xRmNUxL+qLPyAcVmHqIejWRjcDex8jUnN82svygLjpeA=
=2hEY
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 29536
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