2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, config
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, alsaSupport ? stdenv.hostPlatform.isLinux
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2021-02-05 17:12:51 +00:00
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux
|
|
|
|
, libpulseaudio
|
|
|
|
, jackSupport ? true
|
|
|
|
, jack
|
|
|
|
, coreaudioSupport ? stdenv.hostPlatform.isDarwin
|
|
|
|
, CoreAudio
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rtaudio";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "5.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thestk";
|
|
|
|
repo = "rtaudio";
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = lib.optional alsaSupport alsa-lib
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional pulseaudioSupport libpulseaudio
|
|
|
|
++ lib.optional jackSupport jack
|
|
|
|
++ lib.optional coreaudioSupport CoreAudio;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DRTAUDIO_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
|
|
|
|
"-DRTAUDIO_API_PULSE=${if pulseaudioSupport then "ON" else "OFF"}"
|
|
|
|
"-DRTAUDIO_API_JACK=${if jackSupport then "ON" else "OFF"}"
|
|
|
|
"-DRTAUDIO_API_CORE=${if coreaudioSupport then "ON" else "OFF"}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A set of C++ classes that provide a cross platform API for realtime audio input/output";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://www.music.mcgill.ca/~gary/rtaudio/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ magnetophon ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|