summary refs log tree commit diff
path: root/pkgs/servers/x11
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/servers/x11
parent98e2b90cf382e3323f7f5d7b9dcc808099e53685 (diff)
downloadnixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar.gz
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar.bz2
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar.lz
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar.xz
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.tar.zst
nixlib-e7ded267bd39f8509c7c4ab2927c6aec9d567540.zip
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/servers/x11')
-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
3 files changed, 3 insertions, 21 deletions
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index d528f7dd8d28..930132bb071a 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 69216ec70733..000000000000
--- 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 9b7844960a23..2fc012dc6c9d 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 \