From 540d99b6ca13081a872d5aa4a40f3eb128e45e9f Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 11 Sep 2024 20:57:05 +0300 Subject: [PATCH 1/2] portaudio: Correct `alsa-lib` conditional --- pkgs/development/libraries/portaudio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 6d338b0f67e0..9b06dea56b6b 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ pkg-config which ]; - buildInputs = [ libjack2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ alsa-lib ]; + buildInputs = [ libjack2 ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform alsa-lib) [ alsa-lib ]; configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # not sure why, but all the headers seem to be installed by the make install installPhase = '' make install - '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + '' + lib.optionalString (lib.meta.availableOn stdenv.hostPlatform alsa-lib) '' # fixup .pc file to find alsa library sed -i "s|-lasound|-L${alsa-lib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc '' + lib.optionalString stdenv.hostPlatform.isDarwin '' From 7130bf3097c75ef852b9a8faec11794351d1b0aa Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 11 Sep 2024 23:02:54 +0300 Subject: [PATCH 2/2] jackaudio: only add `makeWrapper` when needed The `wrapProgram` usage is behind a conditional below --- pkgs/misc/jackaudio/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index 54827497f846..53087942b933 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -39,7 +39,8 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config python makeWrapper wafHook ]; + nativeBuildInputs = [ pkg-config python wafHook ] + ++ lib.optionals (optDbus != null) [ makeWrapper ]; buildInputs = [ libsamplerate libsndfile readline eigen celt optDbus optPythonDBus optLibffado optAlsaLib optLibopus ] ++ lib.optionals stdenv.hostPlatform.isDarwin [