nixpkgs/pkgs/by-name/ca/cava/package.nix

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

81 lines
1.4 KiB
Nix
Raw Normal View History

2024-10-24 02:23:41 +00:00
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
autoconf-archive,
alsa-lib,
fftw,
iniparser,
2024-10-24 02:43:08 +00:00
libGL,
2024-10-24 02:23:41 +00:00
libpulseaudio,
2024-10-24 02:43:08 +00:00
libtool,
2024-10-24 02:23:41 +00:00
ncurses,
2024-10-24 02:43:08 +00:00
pipewire,
2024-10-24 02:23:41 +00:00
pkgconf,
2024-10-24 02:43:08 +00:00
portaudio,
2024-10-24 02:23:41 +00:00
SDL2,
2024-10-24 02:59:18 +00:00
versionCheckHook,
2024-10-24 02:23:41 +00:00
withSDL2 ? false,
2024-10-24 02:43:08 +00:00
withPipewire ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation rec {
pname = "cava";
2024-05-15 01:25:56 +00:00
version = "0.10.2";
src = fetchFromGitHub {
owner = "karlstav";
repo = "cava";
rev = version;
2024-05-15 01:25:56 +00:00
hash = "sha256-y6RslsU/zmr0Ai/rnr73N3OtjuBcWa3JCwh9P5GkNss=";
};
2024-10-24 02:23:41 +00:00
buildInputs =
[
fftw
2024-10-24 02:43:08 +00:00
iniparser
2024-10-24 02:23:41 +00:00
libpulseaudio
2024-10-24 02:43:08 +00:00
libtool
2024-10-24 02:23:41 +00:00
ncurses
2024-10-24 02:43:08 +00:00
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
portaudio
2024-10-24 02:23:41 +00:00
]
++ lib.optionals withSDL2 [
libGL
2024-10-24 02:43:08 +00:00
SDL2
2024-10-24 02:23:41 +00:00
]
++ lib.optionals withPipewire [
pipewire
];
nativeBuildInputs = [
autoreconfHook
autoconf-archive
pkgconf
2024-10-24 02:59:18 +00:00
versionCheckHook
];
2024-10-24 02:59:18 +00:00
doInstallCheck = true;
versionCheckProgramArg = "-v";
preAutoreconf = ''
echo ${version} > version
'';
2016-05-10 09:48:38 +00:00
meta = with lib; {
description = "Console-based Audio Visualizer for Alsa";
homepage = "https://github.com/karlstav/cava";
2016-05-10 09:48:38 +00:00
license = licenses.mit;
2024-10-24 02:23:41 +00:00
maintainers = with maintainers; [
offline
mirrexagon
];
2024-10-24 02:43:08 +00:00
platforms = platforms.unix;
mainProgram = "cava";
};
}