2017-10-13 12:47:23 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fftw, ncurses5, libpulseaudio, makeWrapper }:
|
2016-02-06 21:25:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-31 15:00:46 +00:00
|
|
|
version = "1.6";
|
2016-02-06 21:25:22 +00:00
|
|
|
name = "cli-visualizer-${version}";
|
|
|
|
|
2017-01-03 11:37:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dpayne";
|
|
|
|
repo = "cli-visualizer";
|
|
|
|
rev = version;
|
2017-10-31 15:00:46 +00:00
|
|
|
sha256 = "0mirp8bk398di5xyq95iprmdyvplfghxqmrfj7jdnpy554vx7ppc";
|
2016-02-06 21:25:22 +00:00
|
|
|
};
|
|
|
|
|
2016-06-19 08:18:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
|
|
|
|
'';
|
|
|
|
|
2017-10-13 12:47:23 +00:00
|
|
|
buildInputs = [ fftw ncurses5 libpulseaudio makeWrapper ];
|
2016-02-06 21:25:22 +00:00
|
|
|
|
|
|
|
buildFlags = [ "ENABLE_PULSE=1" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp build/vis $out/bin/vis
|
2017-10-13 12:47:23 +00:00
|
|
|
# See https://github.com/dpayne/cli-visualizer/issues/62#issuecomment-330738075
|
|
|
|
wrapProgram $out/bin/vis --set TERM rxvt-256color
|
2016-02-06 21:25:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/dpayne/cli-visualizer;
|
2016-02-06 21:25:22 +00:00
|
|
|
description = "CLI based audio visualizer";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2018-04-06 08:57:19 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ ];
|
2016-02-06 21:25:22 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|