8 , alsaSupport ? stdenv.hostPlatform.isLinux
10 , pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux
14 , coreaudioSupport ? stdenv.hostPlatform.isDarwin
19 stdenv.mkDerivation (finalAttrs: {
23 src = fetchFromGitHub {
26 rev = "refs/tags/${finalAttrs.version}";
27 hash = "sha256-Acsxbnl+V+Y4mKC1gD11n0m03E96HMK+oEY/YV7rlIY=";
38 buildInputs = lib.optionals alsaSupport [
40 ] ++ lib.optionals pulseaudioSupport [
42 ] ++ lib.optionals jackSupport [
44 ] ++ lib.optionals coreaudioSupport [
45 darwin.apple_sdk.frameworks.CoreAudio
49 (lib.cmakeBool "RTAUDIO_API_ALSA" alsaSupport)
50 (lib.cmakeBool "RTAUDIO_API_PULSE" pulseaudioSupport)
51 (lib.cmakeBool "RTAUDIO_API_JACK" jackSupport)
52 (lib.cmakeBool "RTAUDIO_API_CORE" coreaudioSupport)
55 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
58 description = "Set of C++ classes that provide a cross platform API for realtime audio input/output";
59 homepage = "https://www.music.mcgill.ca/~gary/rtaudio/";
60 changelog = "https://github.com/thestk/rtaudio/releases/tag/${finalAttrs.version}";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ magnetophon ];
63 platforms = lib.platforms.unix;