spotify-player: Fix darwin support

By requiring alsa-lib as a dependency when using Rodio, this package
would not build under MacOS, since its  alsa-lib dependency does not
support MacOS.

The alsa-lib dependency is only necessary for Linux compilation, so
add a check for Linux.
This commit is contained in:
John Hamelink 2023-09-09 04:22:09 +01:00
parent 84de2599f7
commit cb0549a773
No known key found for this signature in database
GPG Key ID: 153DDFE9A54A9A4C

View File

@ -60,7 +60,7 @@ rustPlatform.buildRustPackage rec {
++ lib.optionals withSixel [ libsixel ]
++ lib.optionals (withAudioBackend == "alsa") [ alsa-lib ]
++ lib.optionals (withAudioBackend == "pulseaudio") [ libpulseaudio ]
++ lib.optionals (withAudioBackend == "rodio") [ alsa-lib ]
++ lib.optionals (withAudioBackend == "rodio" && stdenv.isLinux) [ alsa-lib ]
++ lib.optionals (withAudioBackend == "portaudio") [ portaudio ]
++ lib.optionals (withAudioBackend == "jackaudio") [ libjack2 ]
++ lib.optionals (withAudioBackend == "rodiojack") [ alsa-lib libjack2 ]