From bf3d3dd19b48c432dd83aa0385b47dbe84aa647b Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Nov 2012 02:26:11 +0100 Subject: [PATCH] xinit: Fix logpath and dependencies for startx. It seems that (almost?) all NixOS users start X using the services module, because startx seems to be broken for quite some while. And it hit me while getting to NixOS for the first time as well, so I then decided to just use the service module. As I'm working with multiple X servers, writing wrappers in ~/nixpkgs/config.nix became tedious and so I decided to fix it, hopefully without breaking anything. The fix consists of: * Provide a default location for the Xorg log (~/.xorg.log - hope that's okay) * Expose xauth through xinit to ensure purity and "unexpected behaviour", also known as "simply not working", because xauth isn't in the user's environment. * Actually provide the X binary so it doesn't have to be passed to startx every time. Signed-off-by: aszlig --- pkgs/servers/x11/xorg/overrides.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 79517c91dd6..6d231e2083e 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -272,6 +272,14 @@ in buildInputs = attrs.buildInputs ++ [xorg.libXrender]; }; + xinit = attrs: attrs // { + configureFlags = "--with-xserver=${xorg.xorgserver}/bin/X"; + propagatedBuildInputs = [ xorg.xauth ]; + prePatch = '' + sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp + ''; + }; + xwd = attrs: attrs // { buildInputs = attrs.buildInputs ++ [xorg.libXt]; };