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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1,015 B
Nix
Raw Permalink Normal View History

2021-01-15 06:42:41 +01:00
{ lib, stdenv, fetchFromGitHub, cmake, fftw, ncurses5, libpulseaudio, makeWrapper }:
stdenv.mkDerivation rec {
2019-04-07 19:16:55 +02:00
version = "1.8";
pname = "cli-visualizer";
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";
};
postPatch = ''
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
'';
nativeBuildInputs = [ cmake makeWrapper ];
2020-09-14 21:14:56 +02:00
buildInputs = [ fftw ncurses5 libpulseaudio ];
buildFlags = [ "ENABLE_PULSE=1" ];
2020-09-14 21:14:56 +02:00
postInstall = ''
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";
2021-01-15 06:42:41 +01:00
license = lib.licenses.mit;
maintainers = [ lib.maintainers.matthiasbeyer ];
platforms = with lib.platforms; linux;
2023-06-08 08:25:57 +02:00
mainProgram = "vis";
};
}