sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / xl / xlockmore / package.nix
blobc1eaa8a515c88b00a7338a73930b4fce1dba1188
1 { stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
2 , libXdmcp, libXt, autoreconfHook }:
4 stdenv.mkDerivation rec {
5   pname = "xlockmore";
6   version = "5.81";
8   src = fetchurl {
9     url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz";
10     sha256 = "sha256-BTAYEyinxmi217JMDPoyqpO0u64jwMTwnx07NH7Jipc=";
11     curlOpts = "--user-agent 'Mozilla/5.0'";
12   };
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.
20   configureFlags =
21     [ "--disable-setuid"
22       "--enable-appdefaultdir=${placeholder "out"}/share/X11/app-defaults"
23     ] ++ (lib.optional (pam != null) "--enable-pam");
25   postPatch =
26     let makePath = p: lib.concatMapStringsSep " " (x: x + "/" + p) buildInputs;
27         inputs = "${makePath "lib"} ${makePath "include"}";
28     in ''
29       sed -i 's,\(for ac_dir in\),\1 ${inputs},' configure.ac
30       sed -i 's,/usr/,/no-such-dir/,g' configure.ac
31     '';
33   hardeningDisable = [ "format" ]; # no build output otherwise
35   meta = with lib; {
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";
42   };