libsoundio: fix build on darwin

This commit is contained in:
Weijia Wang 2022-08-30 00:54:35 +02:00
parent 36f77596b1
commit dce67ae452

View File

@ -13,10 +13,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ libjack2 libpulseaudio ]
++ lib.optional stdenv.isLinux alsa-lib
buildInputs = [ libjack2 ]
++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
++ lib.optional stdenv.isDarwin AudioUnit;
cmakeFlags = lib.optionals stdenv.isDarwin [
"-DBUILD_TESTS=OFF"
];
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
meta = with lib; {