1 { stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
2 , libXdmcp, libXt, autoreconfHook }:
4 stdenv.mkDerivation rec {
9 url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz";
10 sha256 = "sha256-UC12U2jTbYFOy3d/1DnHWXkLPdNNXuNfdIB/cbqkdiE=";
11 curlOpts = "--user-agent 'Mozilla/5.0'";
14 # Optionally, it can use GTK.
15 buildInputs = [ pam libX11 libXext.dev libXinerama libXdmcp libXt ];
16 nativeBuildInputs = [ autoreconfHook ];
18 # Don't try to install `xlock' setuid. Password authentication works
19 # fine via PAM without super user privileges.
22 ] ++ (lib.optional (pam != null) "--enable-pam");
25 let makePath = p: lib.concatMapStringsSep " " (x: x + "/" + p) buildInputs;
26 inputs = "${makePath "lib"} ${makePath "include"}";
28 sed -i 's,\(for ac_dir in\),\1 ${inputs},' configure.ac
29 sed -i 's,/usr/,/no-such-dir/,g' configure.ac
30 configureFlags+=" --enable-appdefaultdir=$out/share/X11/app-defaults"
33 hardeningDisable = [ "format" ]; # no build output otherwise
36 description = "Screen locker for the X Window System";
37 homepage = "http://sillycycle.com/xlockmore.html";
38 license = licenses.gpl2Only;
39 maintainers = with maintainers; [ pSub ];
40 platforms = platforms.linux;
41 mainProgram = "xlock";