summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-09-10 16:59:39 +0300
committerGitHub <noreply@github.com>2023-09-10 16:59:39 +0300
commitae34298aaa5c6a2d10f1f9bd7e7c981f409c4930 (patch)
treec18ba88df86bd820be14629088da2b35421b0b5b /pkgs
parent0c33553927cf02a8e6c42b70f4700b0d44e453c6 (diff)
parent05c541d09a5d4f3486c534b6bf5ecacded3129d2 (diff)
Merge pull request #254228 from OPNA2608/fix/pipewire-bigendian
pipewire: Make ldacbt support optional based on availability
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/pipewire/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index fdc514c286b7e..28bbcb4a88901 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -42,10 +42,11 @@
 , bluez
 , sbc
 , libfreeaptx
-, ldacbt
 , liblc3
 , fdk_aac
 , libopus
+, ldacbtSupport ? bluezSupport && lib.meta.availableOn stdenv.hostPlatform ldacbt
+, ldacbt
 , nativeHspSupport ? true
 , nativeHfpSupport ? true
 , nativeModemManagerSupport ? true
@@ -70,6 +71,9 @@
 , ffado
 }:
 
+# Bluetooth codec only makes sense if general bluetooth enabled
+assert ldacbtSupport -> bluezSupport;
+
 let
   mesonEnableFeature = b: if b then "enabled" else "disabled";
 
@@ -144,7 +148,8 @@ let
     ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
     ++ lib.optionals libcameraSupport [ libcamera libdrm ]
     ++ lib.optional ffmpegSupport ffmpeg
-    ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt liblc3 sbc fdk_aac libopus ]
+    ++ lib.optionals bluezSupport [ bluez libfreeaptx liblc3 sbc fdk_aac libopus ]
+    ++ lib.optional ldacbtSupport ldacbt
     ++ lib.optional nativeModemManagerSupport modemmanager
     ++ lib.optional pulseTunnelSupport libpulseaudio
     ++ lib.optional zeroconfSupport avahi
@@ -184,6 +189,7 @@ let
       # source code is not easily obtainable
       "-Dbluez5-codec-lc3plus=disabled"
       "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}"
+      "-Dbluez5-codec-ldac=${mesonEnableFeature ldacbtSupport}"
       "-Dsysconfdir=/etc"
       "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
       "-Draop=${mesonEnableFeature raopSupport}"