Add new package xdummy, a dummy X server.

This is actually a small script which just starts an X server without
any real display. Right now only needed for running the test suite of
the i3 window manager within the Nix chroot, but might be useful for
running other tests needing a DISPLAY.

Usage is just like a regular X server, so in order to start an instance
for display :666, you just run it like this:

xdummy :666

Signed-off-by: aszlig <aszlig@redmoonstudios.org>

aszlig feeb5bae b02d72f7

+85
+83
pkgs/tools/misc/xdummy/default.nix
··· 1 + { stdenv, writeText, writeScriptBin, xorg, xkeyboard_config }: 2 + 3 + let 4 + xorgConfig = writeText "dummy-xorg.conf" '' 5 + Section "ServerLayout" 6 + Identifier "dummy_layout" 7 + Screen 0 "dummy_screen" 8 + InputDevice "dummy_keyboard" "CoreKeyboard" 9 + InputDevice "dummy_mouse" "CorePointer" 10 + EndSection 11 + 12 + Section "ServerFlags" 13 + Option "DontVTSwitch" "true" 14 + Option "AllowMouseOpenFail" "true" 15 + Option "PciForceNone" "true" 16 + Option "AutoEnableDevices" "false" 17 + Option "AutoAddDevices" "false" 18 + EndSection 19 + 20 + Section "Files" 21 + ModulePath "${xorg.xorgserver}/lib/xorg/modules" 22 + ModulePath "${xorg.xf86videodummy}/lib/xorg/modules" 23 + XkbDir "${xkeyboard_config}/share/X11/xkb" 24 + FontPath "${xorg.fontadobe75dpi}/lib/X11/fonts/75dpi" 25 + FontPath "${xorg.fontadobe100dpi}/lib/X11/fonts/100dpi" 26 + FontPath "${xorg.fontbhlucidatypewriter75dpi}/lib/X11/fonts/75dpi" 27 + FontPath "${xorg.fontbhlucidatypewriter100dpi}/lib/X11/fonts/100dpi" 28 + FontPath "${xorg.fontbh100dpi}/lib/X11/fonts/100dpi" 29 + FontPath "${xorg.fontmiscmisc}/lib/X11/fonts/misc" 30 + FontPath "${xorg.fontcursormisc}/lib/X11/fonts/misc" 31 + EndSection 32 + 33 + Section "Module" 34 + Load "dbe" 35 + Load "extmod" 36 + Load "freetype" 37 + Load "glx" 38 + EndSection 39 + 40 + Section "InputDevice" 41 + Identifier "dummy_mouse" 42 + Driver "void" 43 + EndSection 44 + 45 + Section "InputDevice" 46 + Identifier "dummy_keyboard" 47 + Driver "void" 48 + EndSection 49 + 50 + Section "Monitor" 51 + Identifier "dummy_monitor" 52 + HorizSync 30.0 - 130.0 53 + VertRefresh 50.0 - 250.0 54 + Option "DPMS" 55 + EndSection 56 + 57 + Section "Device" 58 + Identifier "dummy_device" 59 + Driver "dummy" 60 + VideoRam 192000 61 + EndSection 62 + 63 + Section "Screen" 64 + Identifier "dummy_screen" 65 + Device "dummy_device" 66 + Monitor "dummy_monitor" 67 + DefaultDepth 24 68 + SubSection "Display" 69 + Depth 24 70 + Modes "1280x1024" 71 + EndSubSection 72 + EndSection 73 + ''; 74 + 75 + in writeScriptBin "xdummy" '' 76 + #!${stdenv.shell} 77 + export XKB_BINDIR="${xorg.xkbcomp}/bin" 78 + exec ${xorg.xorgserver}/bin/Xorg \ 79 + -noreset \ 80 + -logfile /dev/null \ 81 + "$@" \ 82 + -config "${xorgConfig}" 83 + ''
+2
pkgs/top-level/all-packages.nix
··· 2454 2454 2455 2455 xdelta = callPackage ../tools/compression/xdelta { }; 2456 2456 2457 + xdummy = callPackage ../tools/misc/xdummy { }; 2458 + 2457 2459 xfsprogs = callPackage ../tools/filesystems/xfsprogs { }; 2458 2460 2459 2461 xmlroff = callPackage ../tools/typesetting/xmlroff {