diff options
Diffstat (limited to 'nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix')
-rw-r--r-- | nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix new file mode 100644 index 000000000000..f18099d3840e --- /dev/null +++ b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix @@ -0,0 +1,40 @@ +{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama +, libXdmcp, libXt }: + +stdenv.mkDerivation rec { + name = "xlockmore-5.62"; + + src = fetchurl { + url = "http://sillycycle.com/xlock/${name}.tar.xz"; + sha256 = "0b05wgj4mpssy4hd7km5c48i454dfg45p11mfmsr7xjd2gnz5gqi"; + curlOpts = "--user-agent 'Mozilla/5.0'"; + }; + + # Optionally, it can use GTK. + buildInputs = [ pam libX11 libXext libXinerama libXdmcp libXt ]; + + # 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; + }; +} |