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