Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 49 lines 1.4 kB view raw
1{ stdenv 2, lib 3, config 4, fetchFromGitHub 5, cmake 6, pkg-config 7, alsaSupport ? stdenv.hostPlatform.isLinux 8, alsa-lib 9, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux 10, libpulseaudio 11, jackSupport ? true 12, jack 13, coreaudioSupport ? stdenv.hostPlatform.isDarwin 14, CoreAudio 15}: 16 17stdenv.mkDerivation rec { 18 pname = "rtaudio"; 19 version = "5.2.0"; 20 21 src = fetchFromGitHub { 22 owner = "thestk"; 23 repo = "rtaudio"; 24 rev = version; 25 sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987"; 26 }; 27 28 nativeBuildInputs = [ cmake pkg-config ]; 29 30 buildInputs = lib.optional alsaSupport alsa-lib 31 ++ lib.optional pulseaudioSupport libpulseaudio 32 ++ lib.optional jackSupport jack 33 ++ lib.optional coreaudioSupport CoreAudio; 34 35 cmakeFlags = [ 36 "-DRTAUDIO_API_ALSA=${if alsaSupport then "ON" else "OFF"}" 37 "-DRTAUDIO_API_PULSE=${if pulseaudioSupport then "ON" else "OFF"}" 38 "-DRTAUDIO_API_JACK=${if jackSupport then "ON" else "OFF"}" 39 "-DRTAUDIO_API_CORE=${if coreaudioSupport then "ON" else "OFF"}" 40 ]; 41 42 meta = with lib; { 43 description = "A set of C++ classes that provide a cross platform API for realtime audio input/output"; 44 homepage = "https://www.music.mcgill.ca/~gary/rtaudio/"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ magnetophon ]; 47 platforms = platforms.unix; 48 }; 49}