nixpkgs/pkgs/applications/window-managers/sway/idle.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
2021-07-03 08:56:47 +00:00
, meson, ninja, pkg-config, scdoc, wayland-scanner
, wayland, wayland-protocols, runtimeShell
, systemdSupport ? stdenv.isLinux, systemd
2019-01-15 12:09:52 +00:00
}:
stdenv.mkDerivation rec {
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
};
strictDeps = true;
2021-07-03 08:56:47 +00:00
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
buildInputs = [ wayland wayland-protocols ]
++ lib.optionals systemdSupport [ systemd ];
2019-01-15 12:09:52 +00:00
mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=${if systemdSupport then "enabled" else "disabled"}" ];
2019-02-05 22:32:50 +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
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 ];
};
}