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

42 lines
1.2 KiB
Nix
Raw Normal View History

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