portaudio: Correct alsa-lib conditional (#341227)

This commit is contained in:
Artturin 2024-09-26 01:10:53 +03:00 committed by GitHub
commit c0d2c08a87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

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

View File

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