Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 79 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 autoconf-archive, 7 alsa-lib, 8 fftw, 9 iniparser, 10 libGL, 11 libpulseaudio, 12 libtool, 13 ncurses, 14 pipewire, 15 pkgconf, 16 portaudio, 17 SDL2, 18 versionCheckHook, 19 withSDL2 ? false, 20 withPipewire ? stdenv.hostPlatform.isLinux, 21}: 22 23stdenv.mkDerivation rec { 24 pname = "cava"; 25 version = "0.10.4"; 26 27 src = fetchFromGitHub { 28 owner = "karlstav"; 29 repo = "cava"; 30 rev = version; 31 hash = "sha256-oKEUddzg7Gt3uu6x9D65JX0PvuC59r7Psb9VZz3+nCc="; 32 }; 33 34 buildInputs = [ 35 fftw 36 iniparser 37 libpulseaudio 38 libtool 39 ncurses 40 ] 41 ++ lib.optionals stdenv.hostPlatform.isLinux [ 42 alsa-lib 43 ] 44 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 45 portaudio 46 ] 47 ++ lib.optionals withSDL2 [ 48 libGL 49 SDL2 50 ] 51 ++ lib.optionals withPipewire [ 52 pipewire 53 ]; 54 55 nativeBuildInputs = [ 56 autoreconfHook 57 autoconf-archive 58 pkgconf 59 versionCheckHook 60 ]; 61 doInstallCheck = true; 62 versionCheckProgramArg = "-v"; 63 64 preAutoreconf = '' 65 echo ${version} > version 66 ''; 67 68 meta = with lib; { 69 description = "Console-based Audio Visualizer for Alsa"; 70 homepage = "https://github.com/karlstav/cava"; 71 license = licenses.mit; 72 maintainers = with maintainers; [ 73 offline 74 mirrexagon 75 ]; 76 platforms = platforms.unix; 77 mainProgram = "cava"; 78 }; 79}