about summary refs log tree commit diff
path: root/pkgs/misc/screensavers/alock/default.nix
blob: 4fcee6fa9b10c35a138c619e8886c16061e47c2e (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, autoreconfHook
, libX11, pam, libgcrypt, libXrender, imlib2 }:

stdenv.mkDerivation rec {
  pname = "alock";
  version = "2.5.1";

  src = fetchFromGitHub {
    owner = "Arkq";
    repo = "alock";
    rev = "refs/tags/v${version}";
    hash = "sha256-xfPhsXZrTlEqea75SvacDfjM9o21MTudrqfNN9xtdcg=";
  };

  PAM_DEFAULT_SERVICE = "login";

  configureFlags = [
    "--enable-pam"
    "--enable-hash"
    "--enable-xrender"
    "--enable-imlib2"
  ];

  nativeBuildInputs = [ pkg-config autoreconfHook ];
  buildInputs = [
    libX11
    pam libgcrypt libXrender imlib2
  ];

  passthru.updateScript = gitUpdater {
    rev-prefix = "v";
    ignoredVersions = "^[^.]+$"; # ignore versions without a dot
  };

  meta = with lib; {
    homepage = "https://github.com/Arkq/alock";
    description = "Simple screen lock application for X server";
    mainProgram = "alock";
    longDescription = ''
      alock locks the X server until the user enters a password
      via the keyboard. If the authentication was successful
      the X server is unlocked and the user can continue to work.

      alock does not provide any fancy animations like xlock or
      xscreensaver and never will. It's just for locking the current
      X session.
    '';
    platforms = platforms.linux;
    maintainers = with maintainers; [ ftrvxmtrx chris-martin ];
    license = licenses.mit;
  };
}