about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAlexander Ried <ried@mytum.de>2016-10-03 14:28:56 +0200
committerAlexander Ried <ried@mytum.de>2016-10-03 15:03:02 +0200
commite7ded267bd39f8509c7c4ab2927c6aec9d567540 (patch)
tree7b5182443ade183f2b8bc4b6259e007c515e0cfa /pkgs
parent98e2b90cf382e3323f7f5d7b9dcc808099e53685 (diff)
xserver: replace XKB_BINDIR with compile time option
---

Using the configure option relieves us of the patch and passing the path
via the env var in many places. Also the env var may not be inherited
when components like gdm spawn new sessions.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix5
-rw-r--r--pkgs/servers/x11/xorg/xorgserver-xkbcomp-path.patch15
-rw-r--r--pkgs/servers/x11/xquartz/default.nix4
-rw-r--r--pkgs/tools/X11/bumblebee/default.nix1
-rw-r--r--pkgs/tools/X11/xpra/default.nix2
-rw-r--r--pkgs/tools/X11/xpra/gtk3.nix2
-rw-r--r--pkgs/tools/admin/tigervnc/default.nix1
-rw-r--r--pkgs/tools/misc/xdummy/default.nix1
-rw-r--r--pkgs/tools/misc/xvfb-run/default.nix1
9 files changed, 3 insertions, 29 deletions
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index d528f7dd8d285..930132bb071a7 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -426,7 +426,7 @@ in
         dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto
       ];
       # fix_segfault: https://bugs.freedesktop.org/show_bug.cgi?id=91316
-      commonPatches = [ ./xorgserver-xkbcomp-path.patch ];
+      commonPatches = [ ];
       # XQuartz requires two compilations: the first to get X / XQuartz,
       # and the second to get Xvfb, Xnest, etc.
       darwinOtherX = overrideDerivation xorgserver (oldAttrs: {
@@ -454,16 +454,15 @@ in
           "--enable-xcsecurity"         # enable SECURITY extension
           "--with-default-font-path="   # there were only paths containing "${prefix}",
                                         # and there are no fonts in this package anyway
+          "--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
           "--enable-glamor"
         ];
         postInstall = ''
           rm -fr $out/share/X11/xkb/compiled
           ln -s /var/tmp $out/share/X11/xkb/compiled
           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"
           ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
diff --git a/pkgs/servers/x11/xorg/xorgserver-xkbcomp-path.patch b/pkgs/servers/x11/xorg/xorgserver-xkbcomp-path.patch
deleted file mode 100644
index 69216ec707338..0000000000000
--- a/pkgs/servers/x11/xorg/xorgserver-xkbcomp-path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/os/utils.c b/os/utils.c
-index ed7581e..6593455 100644
---- a/os/utils.c
-+++ b/os/utils.c
-@@ -658,6 +658,10 @@ ProcessCommandLine(int argc, char *argv[])
- 
-     defaultKeyboardControl.autoRepeat = TRUE;
- 
-+    char *xkbBinDir = getenv("XKB_BINDIR");
-+    if (xkbBinDir)
-+        XkbBinDirectory = Xstrdup(xkbBinDir);
-+
- #ifdef NO_PART_NET
-     PartialNetwork = FALSE;
- #else
diff --git a/pkgs/servers/x11/xquartz/default.nix b/pkgs/servers/x11/xquartz/default.nix
index 9b7844960a23f..2fc012dc6c9d4 100644
--- a/pkgs/servers/x11/xquartz/default.nix
+++ b/pkgs/servers/x11/xquartz/default.nix
@@ -130,8 +130,7 @@ in stdenv.mkDerivation {
       --replace "@FONTCONFIG_FILE@"   "$fontsConfPath"
 
     wrapProgram $out/bin/Xquartz \
-      --set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11 \
-      --set XKB_BINDIR "${xorg.xkbcomp}/bin"
+      --set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11
 
     defaultStartX="$out/bin/startx -- $out/bin/Xquartz"
 
@@ -141,7 +140,6 @@ in stdenv.mkDerivation {
         XQUARTZ_DEFAULT_SHELL  = "${shell}";
         XQUARTZ_DEFAULT_STARTX = "@STARTX@";
         FONTCONFIG_FILE        = "@FONTCONFIG_FILE@";
-        XKB_BINDIR             = "${xorg.xkbcomp}/bin";
       })} \
       $out/Applications/XQuartz.app/Contents/Info.plist
     substituteInPlace $out/Applications/XQuartz.app/Contents/Info.plist \
diff --git a/pkgs/tools/X11/bumblebee/default.nix b/pkgs/tools/X11/bumblebee/default.nix
index e58aa7042d093..480c929e941a2 100644
--- a/pkgs/tools/X11/bumblebee/default.nix
+++ b/pkgs/tools/X11/bumblebee/default.nix
@@ -122,7 +122,6 @@ in stdenv.mkDerivation rec {
 
   postInstall = ''
     wrapProgram "$out/sbin/bumblebeed" \
-      --set XKB_BINDIR "${xkbcomp}/bin" \
       --prefix PATH : "${bbdPath}" \
       --prefix LD_LIBRARY_PATH : "${bbdLibs}"
 
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index f3159533931bc..9d438dc84b332 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -46,7 +46,6 @@ in buildPythonApplication rec {
 
   postInstall = ''
     wrapProgram $out/bin/xpra \
-      --set XKB_BINDIR "${xkbcomp}/bin" \
       --set FONTCONFIG_FILE "${fontsConf}" \
       --set XPRA_LOG_DIR "\$HOME/.xpra" \
       --set XPRA_INSTALL_PREFIX "$out" \
@@ -58,7 +57,6 @@ in buildPythonApplication rec {
 
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
-  #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
   #  sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
   #  sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra
   #'';
diff --git a/pkgs/tools/X11/xpra/gtk3.nix b/pkgs/tools/X11/xpra/gtk3.nix
index aece94234a8c6..a9ba93507364e 100644
--- a/pkgs/tools/X11/xpra/gtk3.nix
+++ b/pkgs/tools/X11/xpra/gtk3.nix
@@ -51,7 +51,6 @@ buildPythonApplication rec {
 
   postInstall = ''
     wrapProgram $out/bin/xpra \
-      --set XKB_BINDIR "${xkbcomp}/bin" \
       --set FONTCONFIG_FILE "${fontsConf}" \
       --prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \
       --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}
@@ -62,7 +61,6 @@ buildPythonApplication rec {
 
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
-  #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
   #  sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
   #  sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra
   #'';
diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix
index cac1b9b3c92ca..eeefd4d99b5c1 100644
--- a/pkgs/tools/admin/tigervnc/default.nix
+++ b/pkgs/tools/admin/tigervnc/default.nix
@@ -20,7 +20,6 @@ stdenv.mkDerivation rec {
 
   patchPhase = ''
     sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
-    sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xorg.xkbcomp.crossDrv else xorg.xkbcomp}/bin";' unix/vncserver
     sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
     fontPath=
     for i in $fontDirectories; do
diff --git a/pkgs/tools/misc/xdummy/default.nix b/pkgs/tools/misc/xdummy/default.nix
index 1f4dbc8633270..8a411d89da5dd 100644
--- a/pkgs/tools/misc/xdummy/default.nix
+++ b/pkgs/tools/misc/xdummy/default.nix
@@ -74,7 +74,6 @@ let
 
 in writeScriptBin "xdummy" ''
   #!${stdenv.shell}
-  export XKB_BINDIR="${xorg.xkbcomp}/bin"
   exec ${xorg.xorgserver.out}/bin/Xorg \
     -noreset \
     -logfile /dev/null \
diff --git a/pkgs/tools/misc/xvfb-run/default.nix b/pkgs/tools/misc/xvfb-run/default.nix
index 838831faaaf81..c33f09529a56b 100644
--- a/pkgs/tools/misc/xvfb-run/default.nix
+++ b/pkgs/tools/misc/xvfb-run/default.nix
@@ -16,7 +16,6 @@ stdenv.mkDerivation {
 
     chmod a+x $out/bin/xvfb-run
     wrapProgram $out/bin/xvfb-run \
-      --set XKB_BINDIR "${xkbcomp}/bin" \
       --set FONTCONFIG_FILE "${fontsConf}" \
       --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux gawk coreutils ]}
   '';