2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, libjack2, libpulseaudio, AudioUnit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2.0.0";
|
|
|
|
pname = "libsoundio";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andrewrk";
|
|
|
|
repo = "libsoundio";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "12l4rvaypv87vigdrmjz48d4d6sq4gfxf5asvnc4adyabxb73i4x";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [ libjack2 ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin AudioUnit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
|
|
|
"-DBUILD_TESTS=OFF"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
|
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 = "Cross platform audio input and output";
|
|
|
|
homepage = "http://libsound.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.andrewrk ];
|
|
|
|
};
|
|
|
|
}
|