summary refs log tree commit diff
path: root/pkgs/misc/screensavers/xlockmore/default.nix
blob: b3c71c8919126b9cb14f31b84766401e20726a8d (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
{ stdenv, fetchurl, pam ? null, x11 }:

stdenv.mkDerivation rec {

  name = "xlockmore-5.38";
  src = fetchurl {
    url = "http://www.tux.org/~bagleyd/xlock/${name}/${name}.tar.bz2";
    sha256 = "15x5l43zdjn881xf2m9psz9s2hvd2l8py2kzdhdh1v9m4ml20nf4";
  };

  # Optionally, it can use GTK+.
  buildInputs = [ pam x11 ];

  # The `xlock' program needs to be linked against Glibc's
  # `libgcrypt', which contains `crypt(3)'.
  patches = [ ./makefile-libcrypt.patch ];

  # Don't try to install `xlock' setuid. Password authentication works
  # fine via PAM without super user privileges.
  configureFlags =
      " --with-crypt"		# TODO: set --enable-appdefaultdir to a suitable value
    + " --disable-setuid"
    + " --without-editres"
    + " --without-xpm"
    + " --without-gltt"
    + " --without-ttf"
    + " --without-ftgl"
    + " --without-freetype"
    + " --without-opengl"
    + " --without-mesa"
    + " --without-dtsaver"
    + " --without-ext"
    + " --without-dpms"
    + " --without-xinerama"
    + " --without-rplay"
    + " --without-nas"
    + " --without-gtk2"
    + " --without-gtk"
    + (if pam != null then " --enable-pam --enable-bad-pam" else " --disable-pam");

  meta = {
    description = "Screen locker for the X Window System";
    homepage = "http://www.tux.org/~bagleyd/xlockmore.html";
    license = "GPL";
  };
}