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 nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
20 buildInputs = [ wayland wayland-protocols ]
21 ++ lib.optionals systemdSupport [ systemd ];
23 mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=${if systemdSupport then "enabled" else "disabled"}" ];
26 substituteInPlace main.c \
27 --replace '"sh"' '"${runtimeShell}"'
31 description = "Idle management daemon for Wayland";
32 inherit (src.meta) homepage;
34 Sway's idle management daemon. It is compatible with any Wayland
35 compositor which implements the KDE idle protocol.
37 license = licenses.mit;
38 mainProgram = "swayidle";
39 maintainers = with maintainers; [ primeos ];
40 platforms = platforms.linux;