about summary refs log tree commit diff
path: root/pkgs/desktops/xfce/core/xfce4-session/default.nix
blob: f97c07156c583e7f1e3b768210aae69665d1bec2 (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
{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session, runtimeShell }:

mkXfceDerivation {
  category = "xfce";
  pname = "xfce4-session";
  version = "4.14.0";

  sha256 = "0v0xzkdr5rgv6219c1dy96cghgw8bqnb313jccxihfgddf363104";

  buildInputs = [ exo gtk3 glib libxfce4ui libxfce4util libwnck3 xfconf polkit iceauth ];

  configureFlags = [ "--with-xsession-prefix=${placeholder "out"}" ];

  # See https://github.com/NixOS/nixpkgs/issues/36468
  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";

  # Don't use startxfce4 in xfce.desktop
  # It's has FHS isms
  postFixup = ''
    chmod +x $out/etc/xdg/xfce4/xinitrc
    patchShebangs $out/etc/xdg/xfce4/xinitrc

    substituteInPlace "$out/share/xsessions/xfce.desktop" \
      --replace "Exec=startxfce4" "Exec=$out/etc/xdg/xfce4/xinitrc"
  '';

  passthru = {
    xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc";

    providedSessions = [
      "xfce"
    ];
  };

  meta = {
    description = "Session manager for Xfce";
  };
}