about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/screensavers
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/screensavers')
-rw-r--r--nixpkgs/pkgs/misc/screensavers/alock/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix39
-rw-r--r--nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch12
-rw-r--r--nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/light-locker/default.nix83
-rw-r--r--nixpkgs/pkgs/misc/screensavers/physlock/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/screensavers/pipes/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/slock/default.nix36
-rw-r--r--nixpkgs/pkgs/misc/screensavers/vlock/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch34
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xautolock/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix23
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix28
18 files changed, 662 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/screensavers/alock/default.nix b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
new file mode 100644
index 000000000000..59d5a146e165
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchgit, pkgconfig, autoreconfHook
+, libX11, pam, libgcrypt, libXrender, imlib2 }:
+
+stdenv.mkDerivation rec {
+  date = "20170720";
+  name = "alock-${date}";
+
+  src = fetchgit {
+    url = https://github.com/Arkq/alock;
+    rev = "2035e1d4a2293432f5503e82d10f899232eb0f38";
+    sha256 = "1by954fjn0ryqda89zlmq3gclakg3gz7zy1wjrbgw4lzsk538va6";
+  };
+
+  PAM_DEFAULT_SERVICE = "login";
+
+  configureFlags = [
+    "--enable-pam"
+    "--enable-hash"
+    "--enable-xrender"
+    "--enable-imlib2"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    autoreconfHook libX11
+    pam libgcrypt libXrender imlib2
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/Arkq/alock;
+    description = "Simple screen lock application for X server";
+    longDescription = ''
+      alock locks the X server until the user enters a password
+      via the keyboard. If the authentification was successful
+      the X server is unlocked and the user can continue to work.
+
+      alock does not provide any fancy animations like xlock or
+      xscreensaver and never will. It's just for locking the current
+      X session.
+    '';
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ftrvxmtrx chris-martin ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
new file mode 100644
index 000000000000..26143a5ef442
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
@@ -0,0 +1,39 @@
+{
+  stdenv, makeWrapper, fetchFromGitHub, substituteAll,
+  imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh
+}:
+
+stdenv.mkDerivation rec {
+  name = "betterlockscreen-${version}";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "pavanjadhaw";
+    repo = "betterlockscreen";
+    rev = version;
+    sha256 = "0jc8ifb69shmd0avx6vny4m1w5dfxkkf5vnm7qcrmc8yflb0s3z6";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  patches = [ ./replace-i3lock.patch ];
+
+  installPhase = 
+    let 
+      PATH = 
+        stdenv.lib.makeBinPath
+        [imagemagick i3lock-color xdpyinfo xrandr bc feh];
+    in ''
+      mkdir -p $out/bin
+      cp betterlockscreen $out/bin/betterlockscreen
+      wrapProgram "$out/bin/betterlockscreen" --prefix PATH : "$out/bin:${PATH}"
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Betterlockscreen is a simple minimal lock screen which allows you to cache images with different filters and lockscreen with blazing speed.";
+    homepage = https://github.com/pavanjadhaw/betterlockscreen;
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ eyjhb ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch
new file mode 100644
index 000000000000..3bbbfcfd613d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch
@@ -0,0 +1,12 @@
+--- a/betterlockscreen
++++ b/betterlockscreen
+@@ -76,7 +76,7 @@ prelock() {
+ lock() {
+ 	#$1 image path
+ 
+-	i3lock \
++	i3lock-color \
+ 		-t -i "$1" \
+ 		--timepos='x+110:h-70' \
+ 		--datepos='x+43:h-45' \
+
diff --git a/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
new file mode 100644
index 000000000000..6b28c39f7679
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, libav, lua5_1, curl
+, libpng, xorg, pkgconfig, flam3, libgtop, boost, tinyxml, freeglut, libGLU_combined
+, glee }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "electricsheep";
+  version = "2.7b33-2017-10-20";
+
+  src = fetchFromGitHub {
+    owner = "scottdraves";
+    repo = pname;
+    rev = "c02c19b9364733fc73826e105fc983a89a8b4f40";
+    sha256 = "1z49l53j1lhk7ahdy96lm9r0pklwpf2i5s6y2l2rn6l4z8dxkjmk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [
+    wxGTK30 libav lua5_1 curl libpng xorg.libXrender
+    flam3 libgtop boost tinyxml freeglut libGLU_combined glee
+  ];
+
+  preAutoreconf = ''
+    cd client_generic
+    sed -i '/ACX_PTHREAD/d' configure.ac
+  '';
+
+  configureFlags = [
+    "CPPFLAGS=-I${glee}/include/GL"
+  ];
+
+  preBuild = ''
+    sed -i "s|/usr|$out|" Makefile
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Electric Sheep, a distributed screen saver for evolving artificial organisms";
+    homepage = https://electricsheep.org/;
+    maintainers = with maintainers; [ nand0p fpletz ];
+    platforms = platforms.linux;
+    license = licenses.gpl1;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
new file mode 100644
index 000000000000..de6114897318
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, i3lock, imagemagick, scrot, playerctl, fetchFromGitLab }:
+
+stdenv.mkDerivation rec {
+  name = "i3lock-pixeled-${version}";
+  version = "1.2.0";
+
+  src = fetchFromGitLab {
+    owner = "Ma27";
+    repo = "i3lock-pixeled";
+    rev = version;
+    sha256 = "0pysx9sv4i3nnjvpqkrxkxaqja2a2dw5f2r1bzjcgg3c3c5qv74b";
+  };
+
+  propagatedBuildInputs = [
+    i3lock
+    imagemagick
+    scrot
+    playerctl
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)/bin"
+  ];
+
+  patchPhase = ''
+    substituteInPlace i3lock-pixeled \
+       --replace i3lock    "${i3lock}/bin/i3lock" \
+       --replace convert   "${imagemagick}/bin/convert" \
+       --replace scrot     "${scrot}/bin/scrot" \
+       --replace playerctl "${playerctl}/bin/playerctl"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Simple i3lock helper which pixels a screenshot by scaling it down and up to get a pixeled version of the screen when the lock is active.";
+    homepage = https://gitlab.com/Ma27/i3lock-pixeled;
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ma27 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
new file mode 100644
index 000000000000..0b840448f2c0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
@@ -0,0 +1,83 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkgconfig
+, gtk3
+, glib
+, intltool
+, dbus-glib
+, libX11
+, libXScrnSaver
+, libXxf86vm
+, libXext
+, systemd
+, pantheon
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "light-locker";
+  version = "1.9.0";
+
+  outputs = [ "out" "man" ];
+
+  src = fetchFromGitHub {
+    owner = "the-cavalry";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1z5lcd02gqax65qc14hj5khifg7gr53zy3s5i6apba50lbdlfk46";
+  };
+
+  nativeBuildInputs = [
+    intltool
+    meson
+    ninja
+    pkgconfig
+  ];
+
+  buildInputs = [
+    dbus-glib
+    glib
+    gtk3
+    libX11
+    libXScrnSaver
+    libXext
+    libXxf86vm
+    systemd
+    wrapGAppsHook
+  ];
+
+  mesonFlags = [
+    "-Dmit-ext=true"
+    "-Ddpms-ext=true"
+    "-Dxf86gamma-ext=true"
+    "-Dsystemd=true"
+    "-Dupower=true"
+    "-Dlate-locking=true"
+    "-Dlock-on-suspend=true"
+    "-Dlock-on-lid=true"
+    "-Dgsettings=true"
+  ];
+
+  postInstall = ''
+    ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/the-cavalry/light-locker;
+    description = "A simple session-locker for LightDM";
+    longDescription = ''
+      A simple locker (forked from gnome-screensaver) that aims to
+      have simple, sane, secure defaults and be well integrated with
+      the desktop while not carrying any desktop-specific
+      dependencies.
+
+      It relies on LightDM for locking and unlocking your session via
+      ConsoleKit/UPower or logind/systemd.
+    '';
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ obadz ] ++ pantheon.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/physlock/default.nix b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
new file mode 100644
index 000000000000..9855e8688867
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, pam, systemd }:
+
+stdenv.mkDerivation rec {
+  version = "11-dev";
+  name = "physlock-${version}";
+  src = fetchFromGitHub {
+    owner = "muennich";
+    repo = "physlock";
+    rev = "31cc383afc661d44b6adb13a7a5470169753608f";
+    sha256 = "0j6v8li3vw9y7vwh9q9mk1n1cnwlcy3bgr1jgw5gcv2am2yi4vx3";
+  };
+
+  buildInputs = [ pam systemd ];
+
+  preConfigure = ''
+    substituteInPlace Makefile \
+      --replace /usr/local $out \
+      --replace "-m 4755 -o root -g root" ""
+  '';
+
+  makeFlags = "SESSION=systemd";
+
+  meta = with stdenv.lib; {
+    description = "A secure suspend/hibernate-friendly alternative to `vlock -an`";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/pipes/default.nix b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
new file mode 100644
index 000000000000..404346bba631
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, pkgs }:
+
+stdenv.mkDerivation rec {
+  name = "pipes-${version}";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/pipeseroni/pipes.sh/archive/v${version}.tar.gz";
+    sha256 = "09m4alb3clp3rhnqga5v6070p7n1gmnwp2ssqhq87nf2ipfpcaak";
+  };
+
+  buildInputs = with pkgs; [ bash ];
+
+  installPhase = ''
+    mkdir $out -p
+    make PREFIX=$out/ install
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/pipeseroni/pipes.sh;
+    description = "Animated pipes terminal screensaver";
+    license = licenses.mit;
+    maintainers = [ maintainers.matthiasbeyer ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
new file mode 100644
index 000000000000..e8b9346a8727
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, pkgconfig, xlibsWrapper, libXext, libGLU_combined, imagemagick, libtiff, bzip2}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.1";
+  name = "rss-glx-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rss-glx/rss-glx_${version}.tar.bz2";
+    sha256 = "1aikafjqrfmv23jnrrm5d56dg6injh4l67zjdxzdapv9chw7g3cg";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libGLU_combined xlibsWrapper imagemagick libtiff bzip2 ];
+
+  NIX_CFLAGS_COMPILE = "-I${imagemagick.dev}/include/ImageMagick";
+  NIX_LDFLAGS= "-rpath ${libXext}/lib";
+
+  meta = {
+    description = "Really Slick Screensavers Port to GLX";
+    longDescription = ''
+      This package currently contains all of the screensavers from the
+      original collection, plus a few others.
+    '';
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/slock/default.nix b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
new file mode 100644
index 000000000000..f5e8b60cea06
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, writeText
+, xorgproto, libX11, libXext, libXrandr
+# default header can be obtained from
+# https://git.suckless.org/slock/tree/config.def.h
+, conf ? null }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  name = "slock-1.4";
+
+  src = fetchurl {
+    url = "https://dl.suckless.org/tools/${name}.tar.gz";
+    sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m";
+  };
+
+  buildInputs = [ xorgproto libX11 libXext libXrandr ];
+
+  installFlags = "DESTDIR=\${out} PREFIX=";
+
+  postPatch = "sed -i '/chmod u+s/d' Makefile";
+
+  preBuild = optionalString (conf != null) ''
+    cp ${writeText "config.def.h" conf} config.def.h
+  '';
+
+  meta = {
+    homepage = https://tools.suckless.org/slock;
+    description = "Simple X display locker";
+    longDescription = ''
+      Simple X display locker. This is the simplest X screen locker.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ astsmtl ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/default.nix b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
new file mode 100644
index 000000000000..ae89bbd53cc6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pam }:
+
+stdenv.mkDerivation {
+  name = "vlock-2.2.2";
+  src = fetchurl
+  {
+    url = mirror://debian/pool/main/v/vlock/vlock_2.2.2.orig.tar.gz;
+    sha256 = "1b9gv7hmlb8swda5bn40lp1yki8b8wv29vdnhcjqfl6ir98551za";
+  };
+
+  prePatch = ''
+    sed -i -e '/INSTALL/ {
+      s/-[og] [^ ]*//g; s/4711/755/
+    }' Makefile modules/Makefile
+  '';
+
+  patches = [ ./eintr.patch ];
+
+  configureFlags = [ "VLOCK_GROUP=root" "ROOT_GROUP=root" ];
+
+  buildInputs = [ pam ];
+
+  meta = with stdenv.lib; {
+    description = "Virtual console locking program";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.lethalman ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch
new file mode 100644
index 000000000000..64f432434324
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch
@@ -0,0 +1,34 @@
+In systemd I have seen this error, using it as a service:
+
+vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted system call
+
+I think this should fix that.
+
+Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e
+
+diff --git a/modules/new.c b/modules/new.c
+index e9b15fb..7aed640 100644
+--- a/modules/new.c
++++ b/modules/new.c
+@@ -103,9 +103,19 @@ static char *get_console_name(int n)
+  * file descriptor. */
+ static int activate_console(int consfd, int vtno)
+ {
+-  int c = ioctl(consfd, VT_ACTIVATE, vtno);
++  int c;
++  do {
++    c = ioctl(consfd, VT_ACTIVATE, vtno);
++  } while(c != 0 && errno == EINTR);
+ 
+-  return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno);
++  if (c < 0)
++      return c;
++
++  do {
++    c = ioctl(consfd, VT_WAITACTIVE, vtno);
++  } while(c != 0 && errno == EINTR);
++
++  return c;
+ }
+ 
+ struct new_console_context {
diff --git a/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
new file mode 100644
index 000000000000..0da198aab789
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, xlibsWrapper
+, imake, gccmakedep, libXScrnSaver, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  name = "xautolock-${version}";
+  version = "2.2-7-ga23dd5c";
+
+  # This repository contains xautolock-2.2 plus various useful patches that
+  # were collected from Debian, etc.
+  src = fetchFromGitHub {
+    owner = "peti";
+    repo = "xautolock";
+    rev = "v${version}";
+    sha256 = "10j61rl0sx9sh84rjyfyddl73xb5i2cpb17fyrli8kwj39nw0v2g";
+  };
+
+  nativeBuildInputs = [ imake gccmakedep ];
+  buildInputs = [ xlibsWrapper libXScrnSaver xorgproto ];
+
+  makeFlags = [
+    "BINDIR=$(out)/bin"
+    "MANPATH=$(out)/share/man"
+  ];
+
+  installTargets = "install install.man";
+
+  meta = with stdenv.lib; {
+    description = "Launch a given program when your X session has been idle for a given time.";
+    homepage = "http://www.ibiblio.org/pub/linux/X11/screensavers";
+    maintainers = with maintainers; [ garbas peti ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix
new file mode 100644
index 000000000000..47c3c67366e3
--- /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.56";
+
+  src = fetchurl {
+    url = "http://sillycycle.com/xlock/${name}.tar.xz";
+    sha256 = "1dg1n79rnswhxqz36mxnl5lp8p37i9fbibnzzyrqknmvf2s8xpd0";
+    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;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
new file mode 100644
index 000000000000..6a9dfaef497a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, fetchurl, pkgconfig, bc, perl, perlPackages, pam, libXext, libXScrnSaver, libX11
+, libXrandr, libXmu, libXxf86vm, libXrender, libXxf86misc, libjpeg, libGLU_combined, gtk2
+, libxml2, libglade, intltool, xorg, makeWrapper, gle
+, forceInstallAllHacks ? false
+}:
+
+stdenv.mkDerivation rec {
+  version = "5.40";
+  name = "xscreensaver-${version}";
+
+  src = fetchurl {
+    url = "https://www.jwz.org/xscreensaver/${name}.tar.gz";
+    sha256 = "1q2sr7h6ps6d3hk8895g12rrcqiihjl7py1ly077ikv4866r181h";
+  };
+
+  buildInputs =
+    [ pkgconfig bc perl libjpeg libGLU_combined gtk2 libxml2 libglade pam
+      libXext libXScrnSaver libX11 libXrandr libXmu libXxf86vm libXrender
+      libXxf86misc intltool xorg.appres makeWrapper gle
+    ];
+
+  preConfigure =
+    ''
+      # Fix installation paths for GTK resources.
+      sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
+          -i driver/Makefile.in po/Makefile.in.in
+    '';
+
+  configureFlags =
+    [ "--with-gl" "--with-pam" "--with-pixbuf" "--with-proc-interrupts"
+      "--with-dpms-ext" "--with-randr-ext" "--with-xinerama-ext"
+      "--with-xf86vmode-ext" "--with-xf86gamma-ext" "--with-randr-ext"
+      "--with-xshm-ext" "--with-xdbe-ext"
+      "--with-x-app-defaults=\${out}/share/xscreensaver/app-defaults"
+    ];
+
+  postInstall = ''
+      wrapProgram $out/bin/xscreensaver-text \
+        --prefix PATH : ${stdenv.lib.makeBinPath [xorg.appres]}
+      wrapProgram $out/bin/xscreensaver-getimage-file \
+        --set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${with perlPackages; makePerlPath [
+              EncodeLocale HTTPDate HTTPMessage IOSocketSSL LWP LWPProtocolHttps
+              MozillaCA NetHTTP NetSSLeay TryTiny URI
+              ]}"
+  ''
+  + stdenv.lib.optionalString forceInstallAllHacks ''
+    make -C hacks/glx dnalogo
+    cat hacks/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1  | xargs make -C hacks
+    cat hacks/glx/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1  | xargs make -C hacks/glx
+    cp -f $(find hacks -type f -perm -111 "!" -name "*.*" )  "$out/libexec/xscreensaver"
+  ''
+  ;
+
+  meta = {
+    homepage = https://www.jwz.org/xscreensaver/;
+    description = "A set of screensavers";
+    maintainers = with stdenv.lib.maintainers; [ raskin ];
+    platforms = stdenv.lib.platforms.unix; # Once had cygwin problems
+    inherit version;
+    downloadPage = "https://www.jwz.org/xscreensaver/download.html";
+    updateWalker = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
new file mode 100644
index 000000000000..500f7a9c5a3f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchgit, cmake, docutils, pkgconfig, glib, libpthreadstubs
+, libXau, libXdmcp, xcbutil }:
+
+stdenv.mkDerivation {
+  name = "xss-lock-git-2014-03-02";
+
+  src = fetchgit {
+    url = https://bitbucket.org/raymonad/xss-lock.git;
+    rev = "1e158fb20108058dbd62bd51d8e8c003c0a48717";
+    sha256 = "10hx7k7ga8g08akwz8qrsvj8iqr5nd4siiva6sjx789jvf0sak7r";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cmake docutils glib libpthreadstubs libXau
+                  libXdmcp xcbutil ];
+
+  meta = with stdenv.lib; {
+    description = "Use external locker (such as i3lock) as X screen saver";
+    license = licenses.mit;
+    maintainers = with maintainers; [ malyn ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
new file mode 100644
index 000000000000..a278e6dc949f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, glib, pkgconfig, xorg, dbus }:
+
+let rev = "1.0.0"; in
+
+stdenv.mkDerivation {
+  name = "xssproxy-${rev}";
+
+  src = fetchFromGitHub {
+    owner = "timakro";
+    repo = "xssproxy";
+    rev = "v${rev}";
+    sha256 = "0c83wmipnsdnbihc5niyczs7jrkss2s8n6iwwjdia7hkjzbd0hl7";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib xorg.libX11 xorg.libXScrnSaver dbus ];
+
+  makeFlags = [
+    "bindir=$(out)/bin"
+    "man1dir=$(out)/share/man/man1"
+  ];
+
+  meta = {
+    description = "Forward freedesktop.org Idle Inhibition Service calls to Xss";
+    homepage = https://github.com/timakro/xssproxy;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ benley ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
new file mode 100644
index 000000000000..1aa1f347ab45
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchgit, python, pkgconfig, xlibsWrapper, pam }:
+
+stdenv.mkDerivation {
+  name = "xtrlock-pam-3.4-post-20150909";
+
+  src = fetchgit {
+    url = "https://github.com/aanatoly/xtrlock-pam";
+    rev = "6f4920fcfff54791c0779057e9efacbbbbc05df6";
+    sha256 = "1z2wlhi5d05b18pvwz146kp0lkcc6z2mnilk01mk19hzbziyqmsc";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ python xlibsWrapper pam ];
+
+  configurePhase = ''
+    substituteInPlace .config/options.py --replace /usr/include/security/pam_appl.h ${pam}/include/security/pam_appl.h
+    substituteInPlace src/xtrlock.c --replace system-local-login xscreensaver
+    python configure --prefix=$out
+  '';
+
+  meta = {
+    homepage = https://github.com/aanatoly/xtrlock-pam;
+    description = "PAM based X11 screen locker";
+    license = "unknown";
+    maintainers = with stdenv.lib.maintainers; [ tstrobel ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}