pipewire: use elogind if systemd is disabled

Previously, logind functionality would be disabled if systemd was not found.
Since 1.2.5, PipeWire also supports building with elogind.  To minimize
variance between systemd enabled and not, let's use that for non-systemd
builds.
This commit is contained in:
Alyssa Ross
2024-10-14 17:27:14 +02:00
parent a5c8476661
commit cad2799143
@@ -4,6 +4,7 @@
, python3
, meson
, ninja
, elogind
, systemd
, enableSystemd ? true # enableSystemd=false maintained by maintainers.qyliss.
, pkg-config
@@ -120,7 +121,7 @@ stdenv.mkDerivation(finalAttrs: {
ncurses
readline
sbc
] ++ (if enableSystemd then [ systemd ] else [ udev ])
] ++ (if enableSystemd then [ systemd ] else [ elogind udev ])
++ (if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then [ webrtc-audio-processing_1 ] else [ webrtc-audio-processing ])
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform ldacbt) ldacbt
++ lib.optional zeroconfSupport avahi
@@ -146,6 +147,7 @@ stdenv.mkDerivation(finalAttrs: {
(lib.mesonEnable "avahi" zeroconfSupport)
(lib.mesonEnable "gstreamer" true)
(lib.mesonEnable "gstreamer-device-provider" true)
(lib.mesonOption "logind-provider" (if enableSystemd then "libsystemd" else "libelogind"))
(lib.mesonEnable "systemd" enableSystemd)
(lib.mesonEnable "systemd-system-service" enableSystemd)
(lib.mesonEnable "udev" (!enableSystemd))