From 528dedbe73cd705d780e7d49e202f21bf981d0e9 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:48:38 +0200 Subject: [PATCH] jack-example-tools: add darwin support --- pkgs/misc/jackaudio/tools.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/jackaudio/tools.nix b/pkgs/misc/jackaudio/tools.nix index 1e3a74e6f6eed..ac14d1528ce4c 100644 --- a/pkgs/misc/jackaudio/tools.nix +++ b/pkgs/misc/jackaudio/tools.nix @@ -15,6 +15,8 @@ , readline , zita-alsa-pcmi , zita-resampler + +, enableAlsa ? stdenv.isLinux }: stdenv.mkDerivation (final: { @@ -28,21 +30,27 @@ stdenv.mkDerivation (final: { hash = "sha256-5jmynNxwNVLxEZ1MaqQUG6kRwipDkjhrdDCbZHtmAHk="; }; + postPatch = '' + patchShebangs scripts + ''; + nativeBuildInputs = [ pkg-config meson ninja ]; buildInputs = [ jack - alsa-lib libopus libsamplerate libsndfile readline + ] ++ lib.optionals enableAlsa [ + alsa-lib zita-alsa-pcmi zita-resampler ]; - postPatch = '' - patchShebangs scripts - ''; + mesonFlags = [ + (lib.mesonEnable "alsa_in_out" enableAlsa) + (lib.mesonEnable "zalsa" enableAlsa) + ]; # no tests defined, but prepare for some in the future. doCheck = true; @@ -52,7 +60,6 @@ stdenv.mkDerivation (final: { homepage = "https://jackaudio.org"; license = licenses.gpl2Plus; platforms = platforms.unix; - broken = stdenv.isDarwin; maintainers = with maintainers; [ pennae ]; }; })