From 966e56cdfbedc8be3dce8c5ea6050ce4d3075103 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 22 Jan 2020 23:44:50 -0500 Subject: nixos/xfce: use sessionPackages --- pkgs/desktops/xfce/core/xfce4-session/default.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/xfce/core/xfce4-session/default.nix b/pkgs/desktops/xfce/core/xfce4-session/default.nix index 0ab362aa21d0..f97c07156c58 100644 --- a/pkgs/desktops/xfce/core/xfce4-session/default.nix +++ b/pkgs/desktops/xfce/core/xfce4-session/default.nix @@ -1,4 +1,4 @@ -{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session }: +{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session, runtimeShell }: mkXfceDerivation { category = "xfce"; @@ -14,9 +14,25 @@ mkXfceDerivation { # See https://github.com/NixOS/nixpkgs/issues/36468 NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - passthru.xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc"; + # 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 - meta = { + 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"; }; } -- cgit 1.4.1