From 2353f2a8a524d93eb4746d817382e50521018a09 Mon Sep 17 00:00:00 2001 From: Picnoir Date: Fri, 3 Apr 2026 08:20:13 +0200 Subject: [PATCH] pipewire: make ldac decoding opt-in ldac decoding is a pretty niche use case. The decoding libraries are not as good as the encoding ones at best. Dodgy at worst. Let's hide that behind a feature flag that is disabled by default. Overriding it costs the user a mass rebuild, but I think the use case is niche enough to make the tradeoff sensible. See https://github.com/NixOS/nixpkgs/pull/502690 for more context. --- pkgs/by-name/pi/pipewire/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pi/pipewire/package.nix b/pkgs/by-name/pi/pipewire/package.nix index d1a749dd607f..e6e0d575e300 100644 --- a/pkgs/by-name/pi/pipewire/package.nix +++ b/pkgs/by-name/pi/pipewire/package.nix @@ -73,6 +73,7 @@ x11Support && lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform && lib.meta.availableOn stdenv.hostPlatform ffado, + ldacBtDecodeSupport ? false, ffado, libselinux, libebur128, @@ -166,10 +167,8 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optional webrtcAudioProcessingSupport webrtc-audio-processing ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib - ++ lib.optionals ldacbtSupport [ - ldacbt - libldac-dec - ] + ++ lib.optional ldacbtSupport ldacbt + ++ lib.optional (ldacBtDecodeSupport && ldacbtSupport) libldac-dec ++ lib.optional libcameraSupport libcamera ++ lib.optional zeroconfSupport avahi ++ lib.optional raopSupport openssl @@ -238,6 +237,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "bluez5-codec-lc3plus" false) (lib.mesonEnable "bluez5-codec-lc3" bluezSupport) (lib.mesonEnable "bluez5-codec-ldac" (bluezSupport && ldacbtSupport)) + (lib.mesonEnable "bluez5-codec-ldac-dec" (bluezSupport && ldacbtSupport && ldacBtDecodeSupport)) (lib.mesonEnable "opus" true) (lib.mesonOption "sysconfdir" "/etc") (lib.mesonEnable "raop" raopSupport)