libcanberra: use availability check for systemd

systemd isn't available on all Linux platforms, so we should use a
more accurate check than just isLinux for optional systemd
dependencies.
This commit is contained in:
Alyssa Ross
2025-07-20 17:39:44 +02:00
parent a6f9c18cbe
commit 600faf99b5
+3 -4
View File
@@ -12,6 +12,7 @@
gst_all_1,
libvorbis,
libcap,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
withAlsa ? stdenv.hostPlatform.isLinux,
alsa-lib,
@@ -45,10 +46,8 @@ stdenv.mkDerivation rec {
])
++ lib.optional (gtkSupport == "gtk2") gtk2-x11
++ lib.optional (gtkSupport == "gtk3") gtk3-x11
++ lib.optionals stdenv.hostPlatform.isLinux [
libcap
systemd
]
++ lib.optional stdenv.hostPlatform.isLinux libcap
++ lib.optional withSystemd systemd
++ lib.optional withAlsa alsa-lib;
configureFlags =