summary refs log tree commit diff
path: root/pkgs/applications/display-managers/lightdm/default.nix
blob: 6765c5f9dfd00b9fc2973b87f95f555994927ae7 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ stdenv, fetchurl, pam, pkgconfig, libxcb, glib, libXdmcp, itstool, libxml2
, intltool, xlibsWrapper, libxklavier, libgcrypt, libaudit, coreutils
, qt4 ? null
, withQt5 ? false, qtbase
}:

with stdenv.lib;

let
  ver_branch = "1.24";
  version = "1.24.0";
in
stdenv.mkDerivation rec {
  name = "lightdm-${version}";

  src = fetchurl {
    url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
    sha256 = "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d";
  };

  nativeBuildInputs = [ pkgconfig intltool ];
  buildInputs = [
    pam libxcb glib libXdmcp itstool libxml2 libxklavier libgcrypt
    qt4 libaudit
  ] ++ optional withQt5 qtbase;

  configureFlags = [
    "--localstatedir=/var"
    "--sysconfdir=/etc"
    "--disable-tests"
  ] ++ optional (qt4 != null) "--enable-liblightdm-qt"
    ++ optional withQt5 "--enable-liblightdm-qt5";

  installFlags = [
    "sysconfdir=\${out}/etc"
    "localstatedir=\${TMPDIR}"
  ];

  prePatch = ''
    substituteInPlace src/shared-data-manager.c \
      --replace /bin/rm ${coreutils}/bin/rm
  '';

  meta = {
    homepage = https://launchpad.net/lightdm;
    platforms = platforms.linux;
    license = licenses.gpl3;
    maintainers = with maintainers; [ ocharles wkennington ];
  };
}