2018-08-07 21:16:24 +00:00
|
|
|
{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
|
2021-06-18 08:30:13 +00:00
|
|
|
, libXdmcp, libXt, autoreconfHook }:
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2009-09-22 20:16:38 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 21:00:21 +00:00
|
|
|
pname = "xlockmore";
|
2022-08-21 05:54:47 +00:00
|
|
|
version = "5.71";
|
2008-02-15 10:40:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 21:00:21 +00:00
|
|
|
url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz";
|
2022-08-21 05:54:47 +00:00
|
|
|
sha256 = "sha256-ARiy1LKDA8M1QmzWyoRLR3bktxrbHTRPLsCHtXYWwho=";
|
2016-11-17 21:23:55 +00:00
|
|
|
curlOpts = "--user-agent 'Mozilla/5.0'";
|
2008-02-15 10:40:20 +00:00
|
|
|
};
|
|
|
|
|
2019-09-03 22:49:40 +00:00
|
|
|
# Optionally, it can use GTK.
|
2021-06-18 08:30:13 +00:00
|
|
|
buildInputs = [ pam libX11 libXext.dev libXinerama libXdmcp libXt ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2015-08-17 23:51:27 +00:00
|
|
|
|
2012-04-06 18:56:00 +00:00
|
|
|
# Don't try to install `xlock' setuid. Password authentication works
|
|
|
|
# fine via PAM without super user privileges.
|
2009-09-22 20:16:38 +00:00
|
|
|
configureFlags =
|
2015-08-17 23:51:27 +00:00
|
|
|
[ "--disable-setuid"
|
|
|
|
] ++ (lib.optional (pam != null) "--enable-pam");
|
2008-02-15 10:40:20 +00:00
|
|
|
|
2015-08-17 23:51:27 +00: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
|
|
|
|
2018-06-12 23:08:30 +00:00
|
|
|
hardeningDisable = [ "format" ]; # no build output otherwise
|
|
|
|
|
2015-08-17 23:51:27 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Screen locker for the X Window System";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://sillycycle.com/xlockmore.html";
|
2014-11-10 11:46:36 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
platforms = platforms.linux;
|
2008-02-15 10:40:20 +00:00
|
|
|
};
|
|
|
|
}
|