summary refs log tree commit diff
path: root/pkgs/applications/window-managers/i3/lock.nix
blob: 619345d1b96da5fa65af0fd7062adfcd9e20a9cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ fetchurl, stdenv, which, pkgconfig, libxcb, xcbutilkeysyms, xcbutilimage,
  xcbutilxrm, pam, libX11, libev, cairo, libxkbcommon, libxkbfile }:

stdenv.mkDerivation rec {
  pname = "i3lock";
  version = "2.12";

  src = fetchurl {
    url = "https://i3wm.org/i3lock/${pname}-${version}.tar.bz2";
    sha256 = "02dwaqxpclcwiwvpvq7zwz4sxcv9c15dbf17ifalj1p8djls3cnh";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ which libxcb xcbutilkeysyms xcbutilimage xcbutilxrm
    pam libX11 libev cairo libxkbcommon libxkbfile ];

  makeFlags = [ "all" ];
  installFlags = [ "PREFIX=\${out}" "SYSCONFDIR=\${out}/etc" ];
  postInstall = ''
    mkdir -p $out/share/man/man1
    cp *.1 $out/share/man/man1
  '';

  meta = with stdenv.lib; {
    description = "A simple screen locker like slock";
    longDescription = ''
      Simple screen locker. After locking, a colored background (default: white) or
      a configurable image is shown, and a ring-shaped unlock-indicator gives feedback
      for every keystroke. After entering your password, the screen is unlocked again.
    '';
    homepage = https://i3wm.org/i3lock/;
    maintainers = with maintainers; [ malyn domenkozar ];
    license = licenses.bsd3;
    platforms = platforms.all;
  };

}