about summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2022-03-06 06:36:09 +0200
committerGitHub <noreply@github.com>2022-03-06 06:36:09 +0200
commit52e51bec8ab364443c060002bcec67e27126f903 (patch)
tree1ad21aa2707139868c5baf93b65392b64a995bca /pkgs/applications/window-managers
parentb358735cd6c907d5b4a624c67e6b02701750d0bb (diff)
parentdb997037d737da4493544a5b1034aaa43fc20d30 (diff)
Merge pull request #160971 from a-m-joseph/swayidle-honor-systemdSupport
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/sway/idle.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/applications/window-managers/sway/idle.nix b/pkgs/applications/window-managers/sway/idle.nix
index fd424e3074a71..0928fbcfb4ef6 100644
--- a/pkgs/applications/window-managers/sway/idle.nix
+++ b/pkgs/applications/window-managers/sway/idle.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchFromGitHub
 , meson, ninja, pkg-config, scdoc, wayland-scanner
-, wayland, wayland-protocols, systemd
+, wayland, wayland-protocols
+, systemdSupport ? stdenv.isLinux, systemd
 }:
 
 stdenv.mkDerivation rec {
@@ -15,9 +16,10 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
-  buildInputs = [ wayland wayland-protocols systemd ];
+  buildInputs = [ wayland wayland-protocols ]
+                ++ lib.optionals systemdSupport [ systemd ];
 
-  mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=enabled" ];
+  mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=${if systemdSupport then "enabled" else "disabled"}" ];
 
   meta = with lib; {
     description = "Idle management daemon for Wayland";