2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-07-04 02:40:35 +00:00
|
|
|
, meson, ninja, pkg-config, scdoc, wayland-scanner
|
2020-04-24 23:36:52 +00:00
|
|
|
, wayland, wayland-protocols, libxkbcommon, cairo, gdk-pixbuf, pam
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "swaylock";
|
|
|
|
version = "1.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "swaylock";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0r95p4w11dwm5ra614vddz83r8j7z6gd120z2vcchy7m9b0f15kf";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
--replace "version: '1.4'" "version: '${version}'"
|
|
|
|
'';
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ wayland wayland-protocols libxkbcommon cairo gdk-pixbuf pam ];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dpam=enabled" "-Dgdk-pixbuf=enabled" "-Dman-pages=enabled"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Screen locker for Wayland";
|
|
|
|
longDescription = ''
|
|
|
|
swaylock is a screen locking utility for Wayland compositors.
|
2020-05-29 06:06:01 +00:00
|
|
|
Important note: If you don't use the Sway module (programs.sway.enable)
|
|
|
|
you need to set "security.pam.services.swaylock = {};" manually.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|