From 600faf99b58477c130ea8e95865974acbfd86950 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 17 Jul 2025 15:08:39 +0200 Subject: [PATCH] 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. --- pkgs/by-name/li/libcanberra/package.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/li/libcanberra/package.nix b/pkgs/by-name/li/libcanberra/package.nix index 524a5cb908e7..6f54155a265f 100644 --- a/pkgs/by-name/li/libcanberra/package.nix +++ b/pkgs/by-name/li/libcanberra/package.nix @@ -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 =