2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-07-03 08:56:47 +00:00
|
|
|
, meson, ninja, pkg-config, scdoc, wayland-scanner
|
2022-06-16 22:40:49 +00:00
|
|
|
, wayland, wayland-protocols, runtimeShell
|
2022-09-21 07:04:52 +00:00
|
|
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
|
2019-01-15 12:09:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "swayidle";
|
2022-12-07 00:23:10 +00:00
|
|
|
version = "1.8.0";
|
2019-01-15 12:09:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "swayidle";
|
|
|
|
rev = version;
|
2023-08-11 01:56:27 +00:00
|
|
|
hash = "sha256-/U6Y9H5ZqIJph3TZVcwr9+Qfd6NZNYComXuC1D9uGHg=";
|
2019-01-15 12:09:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-08 20:56:15 +00:00
|
|
|
strictDeps = true;
|
2024-09-01 16:20:33 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2021-07-03 08:56:47 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
|
2022-02-19 23:04:05 +00:00
|
|
|
buildInputs = [ wayland wayland-protocols ]
|
|
|
|
++ lib.optionals systemdSupport [ systemd ];
|
2019-01-15 12:09:52 +00:00
|
|
|
|
2022-02-19 23:04:05 +00:00
|
|
|
mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=${if systemdSupport then "enabled" else "disabled"}" ];
|
2019-02-05 22:32:50 +00:00
|
|
|
|
2022-06-16 22:40:49 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace main.c \
|
|
|
|
--replace '"sh"' '"${runtimeShell}"'
|
|
|
|
'';
|
2022-04-06 01:28:41 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-15 12:09:52 +00:00
|
|
|
description = "Idle management daemon for Wayland";
|
2023-08-11 01:56:27 +00:00
|
|
|
inherit (src.meta) homepage;
|
2019-01-15 12:09:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Sway's idle management daemon. It is compatible with any Wayland
|
|
|
|
compositor which implements the KDE idle protocol.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2023-08-11 01:56:27 +00:00
|
|
|
mainProgram = "swayidle";
|
2019-01-15 12:09:52 +00:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2023-08-11 01:56:27 +00:00
|
|
|
platforms = platforms.linux;
|
2019-01-15 12:09:52 +00:00
|
|
|
};
|
|
|
|
}
|