nixpkgs/pkgs/by-name/sw/swayidle/package.nix

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

44 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 ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
2019-01-15 12:09:52 +00:00
}:
stdenv.mkDerivation rec {
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;
hash = "sha256-/U6Y9H5ZqIJph3TZVcwr9+Qfd6NZNYComXuC1D9uGHg=";
2019-01-15 12:09:52 +00:00
};
strictDeps = true;
depsBuildBuild = [ pkg-config ];
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
postPatch = ''
substituteInPlace main.c \
--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";
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;
mainProgram = "swayidle";
2019-01-15 12:09:52 +00:00
maintainers = with maintainers; [ primeos ];
platforms = platforms.linux;
2019-01-15 12:09:52 +00:00
};
}