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