nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix

37 lines
1,020 B
Nix
Raw Normal View History

2017-10-13 14:47:23 +02:00
{ stdenv, fetchFromGitHub, fftw, ncurses5, libpulseaudio, makeWrapper }:
stdenv.mkDerivation rec {
2017-10-31 16:00:46 +01:00
version = "1.6";
name = "cli-visualizer-${version}";
2017-01-03 12:37:17 +01:00
src = fetchFromGitHub {
owner = "dpayne";
repo = "cli-visualizer";
rev = version;
2017-10-31 16:00:46 +01:00
sha256 = "0mirp8bk398di5xyq95iprmdyvplfghxqmrfj7jdnpy554vx7ppc";
};
postPatch = ''
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
'';
2017-10-13 14:47:23 +02:00
buildInputs = [ fftw ncurses5 libpulseaudio makeWrapper ];
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
'';
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;
};
}