portaudio: Correct alsa-lib conditional

This commit is contained in:
Artturin 2024-09-11 20:57:05 +03:00
parent efc90c3e0e
commit 540d99b6ca

View File

@ -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 ''