2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, autoconf-archive
|
2023-08-22 20:05:09 +00:00
|
|
|
, alsa-lib
|
|
|
|
, fftw
|
|
|
|
, iniparser
|
|
|
|
, libpulseaudio
|
2023-10-09 19:29:22 +00:00
|
|
|
, pipewire
|
2023-08-22 20:05:09 +00:00
|
|
|
, ncurses
|
|
|
|
, pkgconf
|
2023-10-09 19:29:22 +00:00
|
|
|
, SDL2
|
|
|
|
, libGL
|
|
|
|
, withSDL2 ? false
|
|
|
|
, withPipewire ? true
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cava";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.10.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "karlstav";
|
|
|
|
repo = "cava";
|
|
|
|
rev = version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-AQR1qc6HgkUkXBRf7kGy4QdtfCj+YVDlYSEIWOutkTk=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
fftw
|
|
|
|
libpulseaudio
|
|
|
|
ncurses
|
2022-11-02 22:02:43 +00:00
|
|
|
iniparser
|
2023-10-09 19:29:22 +00:00
|
|
|
] ++ lib.optionals withSDL2 [
|
|
|
|
SDL2
|
|
|
|
libGL
|
|
|
|
] ++ lib.optionals withPipewire [
|
|
|
|
pipewire
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2023-10-09 19:29:22 +00:00
|
|
|
autoconf-archive
|
2023-08-22 20:05:09 +00:00
|
|
|
pkgconf
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
preAutoreconf = ''
|
|
|
|
echo ${version} > version
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Console-based Audio Visualizer for Alsa";
|
|
|
|
homepage = "https://github.com/karlstav/cava";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ offline mirrexagon ];
|
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "cava";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|