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.nix50
-rw-r--r--nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/light-locker/default.nix90
-rw-r--r--nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/screensavers/physlock/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/pipes/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/slock/default.nix37
-rw-r--r--nixpkgs/pkgs/misc/screensavers/vlock/default.nix30
-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.nix42
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix58
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix24
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix29
18 files changed, 721 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..d10082a71e3e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchgit, pkg-config, 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 = [ pkg-config ];
+  buildInputs = [
+    autoreconfHook libX11
+    pam libgcrypt libXrender imlib2
+  ];
+
+  meta = with 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..8d228890d054
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
@@ -0,0 +1,50 @@
+{ fetchFromGitHub
+, lib
+, makeWrapper
+, stdenv
+
+  # Dependencies (@see https://github.com/pavanjadhaw/betterlockscreen/blob/master/shell.nix)
+, bc
+, coreutils
+, i3lock-color
+, gawk
+, gnugrep
+, gnused
+, imagemagick
+, procps
+, xdpyinfo
+, xrandr
+, xset
+}:
+
+stdenv.mkDerivation rec {
+  pname = "betterlockscreen";
+  version = "4.0.3";
+
+  src = fetchFromGitHub {
+    owner = "pavanjadhaw";
+    repo = "betterlockscreen";
+    rev = "v${version}";
+    sha256 = "sha256-d4uI/S7Kr8yvzc4/L0BX8+TBXb4AVNMJp4gb8uXgBwA=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp betterlockscreen $out/bin/betterlockscreen
+    wrapProgram "$out/bin/betterlockscreen" --prefix PATH : "$out/bin:${lib.makeBinPath [ bc coreutils i3lock-color gawk gnugrep gnused imagemagick procps xdpyinfo xrandr xset ]}"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Fast and sweet looking lockscreen for linux systems with effects!";
+    homepage = "https://github.com/pavanjadhaw/betterlockscreen";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ eyjhb sebtm ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
new file mode 100644
index 000000000000..d1aa7d9911b2
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, ffmpeg, lua5_1, curl
+, libpng, xorg, pkg-config, flam3, libgtop, boost, tinyxml, freeglut, libGLU, libGL
+, glee }:
+
+stdenv.mkDerivation rec {
+  pname = "electricsheep";
+  version = "3.0.2-2019-10-05";
+
+  src = fetchFromGitHub {
+    owner = "scottdraves";
+    repo = pname;
+    rev = "37ba0fd692d6581f8fe009ed11c9650cd8174123";
+    sha256 = "1z49l53j1lhk7ahdy96lm9r0pklwpf2i5s6y2l2rn6l4z8dxkjmk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [
+    wxGTK30 ffmpeg lua5_1 curl libpng xorg.libXrender
+    flam3 libgtop boost tinyxml freeglut libGLU libGL glee
+  ];
+
+  preAutoreconf = ''
+    cd client_generic
+    sed -i '/ACX_PTHREAD/d' configure.ac
+  '';
+
+  configureFlags = [
+    "CPPFLAGS=-I${glee}/include/GL"
+  ];
+
+  makeFlags = [
+    ''CXXFLAGS+="-DGL_GLEXT_PROTOTYPES"''
+  ];
+
+  preBuild = ''
+    sed -i "s|/usr|$out|" Makefile
+  '';
+
+  meta = with lib; {
+    description = "Electric Sheep, a distributed screen saver for evolving artificial organisms";
+    homepage = "https://electricsheep.org/";
+    maintainers = with maintainers; [ 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..cb7a2fd1e184
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, i3lock, imagemagick, scrot, playerctl, fetchFromGitLab }:
+
+stdenv.mkDerivation rec {
+  pname = "i3lock-pixeled";
+  version = "1.2.1";
+
+  src = fetchFromGitLab {
+    owner = "Ma27";
+    repo = "i3lock-pixeled";
+    rev = version;
+    sha256 = "1l9yjf9say0mcqnnjkyj4z3f6y83bnx4jsycd1h10p3m8afbh8my";
+  };
+
+  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 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..ef1143f41430
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
@@ -0,0 +1,90 @@
+{ lib, stdenv
+, fetchFromGitHub
+, nix-update-script
+, meson
+, ninja
+, pkg-config
+, 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
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    dbus-glib
+    glib
+    gtk3
+    libX11
+    libXScrnSaver
+    libXext
+    libXxf86vm
+    systemd
+  ];
+
+  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
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with 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/multilockscreen/default.nix b/nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix
new file mode 100644
index 000000000000..b0c157c778ad
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix
@@ -0,0 +1,47 @@
+{
+  lib, stdenv, makeWrapper, fetchFromGitHub, writeShellScriptBin,
+  imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh, procps, xrdb, xset,
+  gnused, gnugrep, coreutils
+}:
+let
+  i3lock = writeShellScriptBin "i3lock" ''
+    ${i3lock-color}/bin/i3lock-color "$@"
+  '';
+  binPath = lib.makeBinPath [
+    imagemagick i3lock
+    xdpyinfo xrandr xset
+    bc feh procps xrdb
+    gnused gnugrep coreutils
+  ];
+in
+stdenv.mkDerivation rec {
+  pname = "multilockscreen";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "jeffmhubbard";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1bfpbazvhaz9x356nsghz0czysh9b75g79cd9s35v0x0rrzdr9qj";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp multilockscreen $out/bin/multilockscreen
+    wrapProgram "$out/bin/multilockscreen" --prefix PATH : "${binPath}"
+  '';
+
+  meta = with lib; {
+    description = "Wrapper script for i3lock-color";
+    longDescription = ''
+      multilockscreen is a wrapper script for i3lock-color.
+      It allows you to cache background images for i3lock-color with a variety of different effects and adds a stylish indicator.
+    '';
+    homepage = "https://github.com/jeffmhubbard/multilockscreen";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/physlock/default.nix b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
new file mode 100644
index 000000000000..d25a777e650b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, pam, systemd }:
+
+stdenv.mkDerivation rec {
+  version = "v13";
+  pname = "physlock";
+  src = fetchFromGitHub {
+    owner = "muennich";
+    repo = pname;
+    rev = version;
+    sha256 = "1mz4xxjip5ldiw9jgfq9zvqb6w10bcjfx6939w1appqg8f521a7s";
+  };
+
+  buildInputs = [ pam systemd ];
+
+  preConfigure = ''
+    substituteInPlace Makefile \
+      --replace "-m 4755 -o root -g root" ""
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" "SESSION=systemd" ];
+
+  meta = with 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..be605192acce
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, makeWrapper, coreutils, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "pipes";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/pipeseroni/pipes.sh/archive/v${version}.tar.gz";
+    sha256 = "09m4alb3clp3rhnqga5v6070p7n1gmnwp2ssqhq87nf2ipfpcaak";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir $out -p
+    make PREFIX=$out/ install
+
+    wrapProgram $out/bin/pipes.sh \
+      --set PATH "${lib.makeBinPath [ coreutils ncurses ]}"
+  '';
+
+  meta = with 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..981db782c7c9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
@@ -0,0 +1,27 @@
+{lib, stdenv, fetchurl, pkg-config, xlibsWrapper, libXext, libGLU, libGL, imagemagick6, libtiff, bzip2}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.1";
+  pname = "rss-glx";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rss-glx/rss-glx_${version}.tar.bz2";
+    sha256 = "1aikafjqrfmv23jnrrm5d56dg6injh4l67zjdxzdapv9chw7g3cg";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libGLU libGL xlibsWrapper imagemagick6 libtiff bzip2 ];
+
+  NIX_CFLAGS_COMPILE = "-I${imagemagick6.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 = lib.licenses.gpl2;
+    platforms = 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..63ca76e391f4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
@@ -0,0 +1,37 @@
+{ lib, 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 lib;
+stdenv.mkDerivation rec {
+  pname = "slock";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://dl.suckless.org/tools/slock-${version}.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..1602c94c0992
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, pam }:
+
+stdenv.mkDerivation rec {
+  pname = "vlock";
+  version = "2.2.2";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/v/vlock/vlock_${version}.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 lib; {
+    description = "Virtual console locking program";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    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..cdb12b554647
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, xlibsWrapper
+, imake, gccmakedep, libXScrnSaver, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xautolock";
+  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 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; [ 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..680f9c0a5bcb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
+, libXdmcp, libXt, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "xlockmore";
+  version = "5.66";
+
+  src = fetchurl {
+    url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz";
+    sha256 = "sha256-WXalw2YoKNFFIskOBvKN3PyOV3iP3gjri3pw6e87q3E=";
+    curlOpts = "--user-agent 'Mozilla/5.0'";
+  };
+
+  # Optionally, it can use GTK.
+  buildInputs = [ pam libX11 libXext.dev 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"
+    '';
+
+  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..05ebdde853e8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl
+, pkg-config, intltool
+, perl, gettext, libX11, libXext, libXi, libXt
+, libXft, libXinerama, libXrandr, libXxf86vm, libGL, libGLU, gle
+, gtk2, gdk-pixbuf, gdk-pixbuf-xlib, libxml2, pam
+, systemd
+, forceInstallAllHacks ? false
+, withSystemd ? stdenv.isLinux
+}:
+
+stdenv.mkDerivation rec {
+  version = "6.01";
+  pname = "xscreensaver";
+
+  src = fetchurl {
+    url = "https://www.jwz.org/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-CFSEZl2R9gtKHe2s2UvPm3Sw+wlrztyJ/xwkUWjlRzs=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config intltool
+  ];
+
+  buildInputs = [
+    perl gettext libX11 libXext libXi libXt
+    libXft libXinerama libXrandr libXxf86vm libGL libGLU gle
+    gtk2 gdk-pixbuf gdk-pixbuf-xlib libxml2 pam
+  ] ++ lib.optional withSystemd systemd;
+
+  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-app-defaults=${placeholder "out"}/share/xscreensaver/app-defaults"
+  ];
+
+  postInstall = lib.optionalString forceInstallAllHacks ''
+    make -j$NIX_BUILD_CORES -C hacks/glx dnalogo
+    cat hacks/Makefile.in \
+      | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks
+    cat hacks/glx/Makefile.in \
+      | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -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";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.unix; # Once had cygwin problems
+    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..ec7e8f4e7e5c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, docutils, pkg-config, glib, libpthreadstubs
+, libXau, libXdmcp, xcbutil }:
+
+stdenv.mkDerivation {
+  pname = "xss-lock";
+  version = "unstable-2018-05-31";
+
+  src = fetchFromGitHub {
+    owner = "xdbob";
+    repo = "xss-lock";
+    rev = "cd0b89df9bac1880ea6ea830251c6b4492d505a5";
+    sha256 = "040nqgfh564frvqkrkmak3x3h0yadz6kzk81jkfvd9vd20a9drh7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config docutils ];
+  buildInputs = [ glib libpthreadstubs libXau libXdmcp xcbutil ];
+
+  meta = with lib; {
+    description = "Use external locker (such as i3lock) as X screen saver";
+    license = licenses.mit;
+    maintainers = with maintainers; [ malyn offline ];
+    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..5e1c42084137
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, glib, pkg-config, 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 = [ pkg-config ];
+  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 = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ benley ];
+    platforms = 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..6908429e21b9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchgit, python, pkg-config, xlibsWrapper, pam }:
+
+stdenv.mkDerivation {
+  pname = "xtrlock-pam";
+  version = "3.4-post-20150909";
+
+  src = fetchgit {
+    url = "https://github.com/aanatoly/xtrlock-pam";
+    rev = "6f4920fcfff54791c0779057e9efacbbbbc05df6";
+    sha256 = "1z2wlhi5d05b18pvwz146kp0lkcc6z2mnilk01mk19hzbziyqmsc";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 lib.maintainers; [ tstrobel ];
+    platforms = with lib.platforms; linux;
+  };
+}