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-02-19 23:04:05 +00:00
|
|
|
, systemdSupport ? stdenv.isLinux, systemd
|
2019-01-15 12:09:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "swayidle";
|
2022-01-15 17:29:34 +00:00
|
|
|
version = "1.7.1";
|
2019-01-15 12:09:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "swayidle";
|
|
|
|
rev = version;
|
2022-01-15 17:29:34 +00:00
|
|
|
sha256 = "06iq12p4438d6bv3jlqsf01wjaxrzlnj1bnicn41kad563aq41xl";
|
2019-01-15 12:09:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-08 20:56:15 +00:00
|
|
|
strictDeps = true;
|
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
|
|
|
# Remove the `%zu` patch for the next release after 1.7.1.
|
|
|
|
# https://github.com/swaywm/swayidle/commit/e81d40fca7533f73319e76e42fa9694b21cc9e6e
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace main.c \
|
|
|
|
--replace '%lu' '%zu' \
|
|
|
|
--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";
|
|
|
|
longDescription = ''
|
|
|
|
Sway's idle management daemon. It is compatible with any Wayland
|
|
|
|
compositor which implements the KDE idle protocol.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|