2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
|
2021-06-28 23:13:55 +00:00
|
|
|
, libXdmcp, libXt, autoreconfHook }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "xlockmore";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "5.67";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-qGB+Fw4N9K+PcH07OPfOsNDhKHc9fhdeICCSaV9/I0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
curlOpts = "--user-agent 'Mozilla/5.0'";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Optionally, it can use GTK.
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ pam libX11 libXext.dev libXinerama libXdmcp libXt ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Don't try to install `xlock' setuid. Password authentication works
|
|
|
|
# fine via PAM without super user privileges.
|
|
|
|
configureFlags =
|
|
|
|
[ "--disable-setuid"
|
|
|
|
] ++ (lib.optional (pam != null) "--enable-pam");
|
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ]; # no build output otherwise
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Screen locker for the X Window System";
|
|
|
|
homepage = "http://sillycycle.com/xlockmore.html";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|