diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-08-18 02:51:27 +0300 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-08-31 16:35:26 +0200 |
commit | 4ce182c7365f96cc7446d2bcc7b5846a64690973 (patch) | |
tree | be650c65557333632b4af4c3ed9e2572335e571a /pkgs/misc/screensavers | |
parent | 77f18a152bcb92a329fc6cef6712b095c7aff752 (diff) | |
download | nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar.gz nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar.bz2 nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar.lz nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar.xz nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.tar.zst nixlib-4ce182c7365f96cc7446d2bcc7b5846a64690973.zip |
xlockmore: clean configure flags and add Xinerama and DPMS support
Close #9391.
Diffstat (limited to 'pkgs/misc/screensavers')
-rw-r--r-- | pkgs/misc/screensavers/xlockmore/default.nix | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/pkgs/misc/screensavers/xlockmore/default.nix b/pkgs/misc/screensavers/xlockmore/default.nix index f635e0f149bb..cef143e309a4 100644 --- a/pkgs/misc/screensavers/xlockmore/default.nix +++ b/pkgs/misc/screensavers/xlockmore/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pam ? null, x11 }: +{ stdenv, lib, fetchurl, pam ? null, autoreconfHook +, libX11, libXext, libXinerama, libXdmcp, libXt }: stdenv.mkDerivation rec { @@ -9,37 +10,26 @@ stdenv.mkDerivation rec { }; # Optionally, it can use GTK+. - buildInputs = [ pam x11 ]; + 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 = - " --with-crypt" - + " --enable-appdefaultdir=$out/share/X11/app-defaults" - + " --disable-setuid" - + " --without-editres" - + " --without-xpm" - + " --without-gltt" - + " --without-ttf" - + " --without-ftgl" - + " --without-freetype" - + " --without-opengl" - + " --without-mesa" - + " --without-dtsaver" - + " --without-ext" - + " --without-dpms" - + " --without-xinerama" - + " --without-rplay" - + " --without-nas" - + " --without-gtk2" - + " --without-gtk" - + (if pam != null then " --enable-pam --enable-bad-pam" else " --disable-pam"); + [ "--disable-setuid" + ] ++ (lib.optional (pam != null) "--enable-pam"); - preConfigure = '' - configureFlags+=" --enable-appdefaultdir=$out/share/X11/app-defaults" - ''; + 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 stdenv.lib; { + meta = with lib; { description = "Screen locker for the X Window System"; homepage = http://www.tux.org/~bagleyd/xlockmore.html; license = licenses.gpl2; |