1 { lib, stdenv, fetchFromGitHub
2 , meson, ninja, pkg-config, scdoc, wayland-scanner
3 , wayland, wayland-protocols, runtimeShell
4 , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
15 hash = "sha256-/U6Y9H5ZqIJph3TZVcwr9+Qfd6NZNYComXuC1D9uGHg=";
19 depsBuildBuild = [ pkg-config ];
20 nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
21 buildInputs = [ wayland wayland-protocols ]
22 ++ lib.optionals systemdSupport [ systemd ];
24 mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=${if systemdSupport then "enabled" else "disabled"}" ];
27 substituteInPlace main.c \
28 --replace '"sh"' '"${runtimeShell}"'
32 description = "Idle management daemon for Wayland";
33 inherit (src.meta) homepage;
35 Sway's idle management daemon. It is compatible with any Wayland
36 compositor which implements the KDE idle protocol.
38 license = licenses.mit;
39 mainProgram = "swayidle";
40 maintainers = with maintainers; [ primeos ];
41 platforms = platforms.linux;