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