diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix b/nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix new file mode 100644 index 000000000000..7aecc8f823ee --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/cli-visualizer/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, fftw, ncurses5, libpulseaudio, makeWrapper }: + +stdenv.mkDerivation rec { + version = "1.7"; + name = "cli-visualizer-${version}"; + + src = fetchFromGitHub { + owner = "dpayne"; + repo = "cli-visualizer"; + rev = version; + sha256 = "06z6vj87xjmacppcxvgm47wby6mv1hnbqav8lpdk9v5s1hmmp1cr"; + }; + + postPatch = '' + sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp + ''; + + buildInputs = [ fftw ncurses5 libpulseaudio makeWrapper ]; + + buildFlags = [ "ENABLE_PULSE=1" ]; + + installPhase = '' + mkdir -p $out/bin + cp build/vis $out/bin/vis + # 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 = with stdenv.lib.maintainers; [ ]; + platforms = with stdenv.lib.platforms; linux; + }; +} |