2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, fftw, ncurses5, libpulseaudio, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.8";
|
|
|
|
pname = "cli-visualizer";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dpayne";
|
|
|
|
repo = "cli-visualizer";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "003mbbwsz43mg3d7llphpypqa9g7rs1p1cdbqi1mbc2bfrc1gcq2";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ fftw ncurses5 libpulseaudio makeWrapper ];
|
|
|
|
|
|
|
|
buildFlags = [ "ENABLE_PULSE=1" ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postInstall = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# See https://github.com/dpayne/cli-visualizer/issues/62#issuecomment-330738075
|
|
|
|
wrapProgram $out/bin/vis --set TERM rxvt-256color
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/dpayne/cli-visualizer";
|
|
|
|
description = "CLI based audio visualizer";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|