2015-08-18 00:51:27 +01:00
|
|
|
{ stdenv, lib, fetchurl, pam ? null, autoreconfHook
|
|
|
|
, libX11, libXext, libXinerama, libXdmcp, libXt }:
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2009-09-22 21:16:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2015-04-09 15:22:30 +01:00
|
|
|
name = "xlockmore-5.46";
|
2008-02-15 10:40:20 +00:00
|
|
|
src = fetchurl {
|
2015-04-09 15:22:30 +01:00
|
|
|
url = "http://www.tux.org/~bagleyd/xlock/${name}.tar.xz";
|
|
|
|
sha256 = "1ps0dmnh912x8mwns94y2607xk90rjxrjn5s1pkmmpjg5h9bxcrj";
|
2008-02-15 10:40:20 +00:00
|
|
|
};
|
|
|
|
|
2012-04-06 19:56:00 +01:00
|
|
|
# Optionally, it can use GTK+.
|
2015-08-18 00:51:27 +01:00
|
|
|
buildInputs = [ pam libX11 libXext libXinerama libXdmcp libXt ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2012-04-06 19:56:00 +01:00
|
|
|
# Don't try to install `xlock' setuid. Password authentication works
|
|
|
|
# fine via PAM without super user privileges.
|
2009-09-22 21:16:38 +01:00
|
|
|
configureFlags =
|
2015-08-18 00:51:27 +01:00
|
|
|
[ "--disable-setuid"
|
|
|
|
] ++ (lib.optional (pam != null) "--enable-pam");
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2015-08-18 00:51:27 +01:00
|
|
|
postPatch =
|
|
|
|
let makePath = p: lib.concatMapStringsSep " " (x: x + "/" + p) buildInputs;
|
|
|
|
inputs = "${makePath "lib"} ${makePath "include"}";
|
|
|
|
in ''
|
|
|
|
sed -i 's,\(for ac_dir in\),\1 ${inputs},' configure.ac
|
|
|
|
sed -i 's,/usr/,/no-such-dir/,g' configure.ac
|
|
|
|
configureFlags+=" --enable-appdefaultdir=$out/share/X11/app-defaults"
|
|
|
|
'';
|
2014-11-10 11:46:36 +00:00
|
|
|
|
2015-08-18 00:51:27 +01:00
|
|
|
meta = with lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Screen locker for the X Window System";
|
2014-11-10 11:46:36 +00:00
|
|
|
homepage = http://www.tux.org/~bagleyd/xlockmore.html;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
platforms = platforms.linux;
|
2008-02-15 10:40:20 +00:00
|
|
|
};
|
|
|
|
}
|