about summary refs log tree commit diff
path: root/pkgs/by-name/wa/waybar/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/wa/waybar/package.nix')
-rw-r--r--pkgs/by-name/wa/waybar/package.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/by-name/wa/waybar/package.nix b/pkgs/by-name/wa/waybar/package.nix
index fe8143c2eb49..7f5c9ad4432b 100644
--- a/pkgs/by-name/wa/waybar/package.nix
+++ b/pkgs/by-name/wa/waybar/package.nix
@@ -37,6 +37,7 @@
   scdoc,
   sndio,
   spdlog,
+  systemdMinimal,
   sway,
   udev,
   upower,
@@ -53,13 +54,14 @@
   inputSupport ? true,
   jackSupport ? true,
   mpdSupport ? true,
-  mprisSupport ? stdenv.isLinux,
+  mprisSupport ? stdenv.hostPlatform.isLinux,
   nlSupport ? true,
   pipewireSupport ? true,
   pulseSupport ? true,
   rfkillSupport ? true,
   runTests ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
   sndioSupport ? true,
+  systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
   swaySupport ? true,
   traySupport ? true,
   udevSupport ? true,
@@ -76,8 +78,8 @@ let
   libcava.src = fetchFromGitHub {
     owner = "LukashonakV";
     repo = "cava";
-    rev = "0.10.2";
-    hash = "sha256-jU7RQV2txruu/nUUl0TzjK4nai7G38J1rcTjO7UXumY=";
+    rev = "0.10.3";
+    hash = "sha256-ZDFbI69ECsUTjbhlw2kHRufZbQMu+FQSMmncCJ5pagg=";
   };
 in
 stdenv.mkDerivation (finalAttrs: {
@@ -153,12 +155,13 @@ stdenv.mkDerivation (finalAttrs: {
     ++ lib.optional pulseSupport libpulseaudio
     ++ lib.optional sndioSupport sndio
     ++ lib.optional swaySupport sway
+    ++ lib.optional systemdSupport systemdMinimal
     ++ lib.optional traySupport libdbusmenu-gtk3
     ++ lib.optional udevSupport udev
     ++ lib.optional upowerSupport upower
     ++ lib.optional wireplumberSupport wireplumber
     ++ lib.optional (cavaSupport || pipewireSupport) pipewire
-    ++ lib.optional (!stdenv.isLinux) libinotify-kqueue;
+    ++ lib.optional (!stdenv.hostPlatform.isLinux) libinotify-kqueue;
 
   nativeCheckInputs = [ catch2_3 ];
   doCheck = runTests;
@@ -179,14 +182,16 @@ stdenv.mkDerivation (finalAttrs: {
       "pulseaudio" = pulseSupport;
       "rfkill" = rfkillSupport;
       "sndio" = sndioSupport;
-      "systemd" = true;
+      "systemd" = systemdSupport;
       "tests" = runTests;
       "upower_glib" = upowerSupport;
       "wireplumber" = wireplumberSupport;
     })
     ++ lib.optional experimentalPatches (lib.mesonBool "experimental" true);
 
-  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+  env = lib.optionalAttrs systemdSupport {
+    PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+  };
 
   postPatch = ''
     substituteInPlace include/util/command.hpp \