librespot: add withMDNS + withDNS-SD arguments

librespot always included the zeroconf mdns backend prior to
https://github.com/librespot-org/librespot/commit/94d174c33d30a4baa30799b4e9a85b63d4331b2c
(included in release 0.6.0).

This added the `with-libmdns` feature and enabled it by default,
reflecting the settings of 0.5.0.

Since the derivation disables all default features, switching to 0.6.0
silently removed the mdns zeroconf backend of librespot.

Also removes `avahi-compat` as buildInput for `withAvahi` as it is
not needed.
This commit is contained in:
Maximilian Güntner
2025-04-07 23:02:00 +02:00
parent 95073a8ab4
commit fa56896456
@@ -15,6 +15,8 @@
libpulseaudio,
withRodio ? true,
withAvahi ? false,
withMDNS ? true,
withDNS-SD ? false,
avahi-compat,
}:
@@ -44,13 +46,15 @@ rustPlatform.buildRustPackage rec {
buildInputs =
[ openssl ]
++ lib.optional withALSA alsa-lib
++ lib.optional withAvahi avahi-compat
++ lib.optional withDNS-SD avahi-compat
++ lib.optional withPortAudio portaudio
++ lib.optional withPulseAudio libpulseaudio;
buildNoDefaultFeatures = true;
buildFeatures =
lib.optional withRodio "rodio-backend"
++ lib.optional withMDNS "with-libmdns"
++ lib.optional withDNS-SD "with-dns-sd"
++ lib.optional withALSA "alsa-backend"
++ lib.optional withAvahi "with-avahi"
++ lib.optional withPortAudio "portaudio-backend"