From dce67ae4528b68a7bd117fd2146e5f3292260220 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 30 Aug 2022 00:54:35 +0200 Subject: [PATCH] libsoundio: fix build on darwin --- pkgs/development/libraries/libsoundio/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libsoundio/default.nix b/pkgs/development/libraries/libsoundio/default.nix index 2ef629e5467b..438c278bfadc 100644 --- a/pkgs/development/libraries/libsoundio/default.nix +++ b/pkgs/development/libraries/libsoundio/default.nix @@ -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; {