1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

xorg.xorgserver: wrap Xvfb with required flags

This commit is contained in:
Domen Kožar 2016-01-17 21:14:49 +01:00
parent 4a0692a5fb
commit 9e8eba48ab
4 changed files with 5 additions and 22 deletions

View file

@ -9,19 +9,6 @@
with lib;
let
# Wrap Xvfb to set some flags/variables.
xvfbWrapper = pkgs.writeScriptBin "Xvfb"
''
#! ${pkgs.stdenv.shell}
export XKB_BINDIR=${pkgs.xorg.xkbcomp}/bin
export XORG_DRI_DRIVER_PATH=${pkgs.mesa}/lib/dri
exec ${pkgs.xorg.xorgserver}/bin/Xvfb "$@" -xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb
'';
in
{
config = {
@ -54,7 +41,7 @@ in
{ description = "Terminal Server";
path =
[ xvfbWrapper pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth
[ pkgs.xorgserver pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth
pkgs.nettools pkgs.shadow pkgs.procps pkgs.utillinux pkgs.bash
];

View file

@ -325,6 +325,10 @@ in
wrapProgram $out/bin/Xephyr \
--set XKB_BINDIR "${xorg.xkbcomp}/bin" \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
wrapProgram $out/bin/Xvfb \
--set XKB_BINDIR "${xorg.xkbcomp}/bin" \
--set XORG_DRI_DRIVER_PATH ${args.mesa}/lib/dri \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
'';
passthru.version = version; # needed by virtualbox guest additions
} else {

View file

@ -33,10 +33,6 @@ buildPythonPackage rec {
pillow pygtk pygobject
];
postPatch = ''
sed -i 's|DEFAULT_XVFB_COMMAND = "Xvfb|DEFAULT_XVFB_COMMAND = "Xvfb -xkbdir ${xkeyboard_config}/etc/X11/xkb|' xpra/platform/features.py
'';
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0) $(pkg-config --cflags pygtk-2.0) $(pkg-config --cflags xtst)"
'';

View file

@ -33,10 +33,6 @@ buildPythonPackage rec {
pygobject3 pycairo cython
];
postPatch = ''
sed -i 's|DEFAULT_XVFB_COMMAND = "Xvfb|DEFAULT_XVFB_COMMAND = "Xvfb -xkbdir ${xkeyboard_config}/etc/X11/xkb|' xpra/platform/features.py
'';
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-3.0) $(pkg-config --cflags xtst)"
'';