summary refs log tree commit diff
path: root/pkgs/applications/display-managers/slim/default.nix
blob: 0675b02a314e85dba65eea38a6af9bdc1bf0102d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchurl, cmake, pkgconfig, x11, libjpeg, libpng12, libXmu
, fontconfig, freetype, pam, consolekit, dbus_libs }:

stdenv.mkDerivation rec {
  name = "slim-1.3.4";

  src = fetchurl {
    url = "http://download.berlios.de/slim/${name}.tar.gz";
    sha256 = "00fmrg2v41jnqhx0yc1kv97xxh5gai18n0i4as9g1fcq1i32cp0m";
  };

  patches = [
    # Allow the paths of the configuration file and theme directory to
    # be set at runtime.
    ./runtime-paths.patch
  ];

  buildInputs =
    [ cmake pkgconfig x11 libjpeg libpng12 libXmu fontconfig freetype
      pam dbus_libs
    ] ++ stdenv.lib.optional (consolekit != null) consolekit;

  preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc";

  cmakeFlags = [ "-DUSE_PAM=1" ] ++ stdenv.lib.optional (consolekit != null) "-DUSE_CONSOLEKIT=1";

  NIX_CFLAGS_LINK = "-lXmu";

  meta = {
    homepage = http://slim.berlios.de;
    platforms = stdenv.lib.platforms.linux;
  };
}