nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix

41 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, pam ? null, autoreconfHook
, libX11, libXext, libXinerama, libXdmcp, libXt }:
stdenv.mkDerivation rec {
2017-08-27 03:47:42 +02:00
name = "xlockmore-5.55";
src = fetchurl {
2016-11-17 22:23:55 +01:00
url = "http://sillycycle.com/xlock/${name}.tar.xz";
2017-08-27 03:47:42 +02:00
sha256 = "1y3f76rq2nd10fgi2rx81aj6pijglmm661vjsxi05hpg35dzmwfl";
2016-11-17 22:23:55 +01:00
curlOpts = "--user-agent 'Mozilla/5.0'";
};
# Optionally, it can use GTK+.
buildInputs = [ pam libX11 libXext libXinerama libXdmcp libXt ];
nativeBuildInputs = [ autoreconfHook ];
# 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"
'';
meta = with lib; {
description = "Screen locker for the X Window System";
2017-11-11 17:36:33 +01:00
homepage = http://sillycycle.com/xlockmore.html;
license = licenses.gpl2;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}