nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix

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

50 lines
1.3 KiB
Nix
Raw Normal View History

2021-02-02 22:39:38 +01:00
{ stdenv
, lib
, config
, fetchFromGitHub
, cmake
, pkg-config
, alsaSupport ? stdenv.hostPlatform.isLinux
, alsa-lib
2021-02-02 22:39:38 +01:00
, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux
, libpulseaudio
, jackSupport ? true
, jack
, coreaudioSupport ? stdenv.hostPlatform.isDarwin
, CoreAudio
}:
stdenv.mkDerivation rec {
pname = "rtaudio";
2021-11-21 12:22:05 +01:00
version = "5.2.0";
src = fetchFromGitHub {
owner = "thestk";
repo = "rtaudio";
2019-09-09 01:38:31 +02:00
rev = version;
2021-11-21 12:22:05 +01:00
sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987";
};
2021-02-02 22:39:38 +01:00
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = lib.optional alsaSupport alsa-lib
2021-02-02 22:39:38 +01: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"}"
];
meta = with lib; {
description = "A set of C++ classes that provide a cross platform API for realtime audio input/output";
2021-02-02 22:39:38 +01:00
homepage = "https://www.music.mcgill.ca/~gary/rtaudio/";
2019-09-12 13:03:49 +02:00
license = licenses.mit;
2021-02-02 22:39:38 +01:00
maintainers = with maintainers; [ magnetophon ];
2019-09-12 13:03:49 +02:00
platforms = platforms.unix;
};
}