1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/pkgs/applications/display-managers/slim/default.nix
Eelco Dolstra 873662b8ad slim: Work around broken PAM session handling
Previously logging in via SLiM more than once didn't work because SLiM
doesn't clean up its PAM session properly (that is, in a child rather
than in the parent).  Thus the slim process becomes part of the user
session's cgroup, among other things.  This patch causes SLiM to exit
after the session has finished, after which systemd will restart
display-manager.service.

Fixes NixOS/nixops#137.
2013-10-15 13:23:40 +02:00

42 lines
1.1 KiB
Nix

{ stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng
, fontconfig, freetype, pam, dbus_libs }:
stdenv.mkDerivation rec {
name = "slim-1.3.6";
src = fetchurl {
url = "http://download.berlios.de/slim/${name}.tar.gz";
sha256 = "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1";
};
patches =
[ # Allow the paths of the configuration file and theme directory to
# be set at runtime.
./runtime-paths.patch
# Exit after the user's session has finished. This works around
# slim's broken PAM session handling (see
# http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
./run-once.patch
];
preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc --replace /lib $out/lib";
cmakeFlags = [ "-DUSE_PAM=1" ];
enableParallelBuilding = true;
buildInputs =
[ cmake pkgconfig libjpeg libpng fontconfig freetype
pam dbus_libs
xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft
];
NIX_CFLAGS_LINK = "-lXmu";
meta = {
homepage = http://slim.berlios.de;
platforms = stdenv.lib.platforms.linux;
};
}