summary refs log tree commit diff
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-09-23 10:38:44 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-09-23 10:42:34 +0200
commit76ef7a93e302a4a92954e4b40863c6702df5ac8d (patch)
tree421a74c886dadc0001b7f42a78ad2cf8b1a5de6f
parent6b0add86b99f7d03f6bc80c1742f79e80b9ae413 (diff)
parenteb09b1fd856e7346d60188b2df64fdfe758c2fc4 (diff)
downloadnixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar.gz
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar.bz2
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar.lz
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar.xz
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.tar.zst
nixlib-76ef7a93e302a4a92954e4b40863c6702df5ac8d.zip
Merge: xlibs and x11 attribute cleanup
Frequently using multiple *almost* identical attributes is bad.
-rw-r--r--doc/functions.xml2
-rw-r--r--nixos/modules/services/x11/display-managers/gdm.nix2
-rw-r--r--nixos/modules/services/x11/display-managers/kdm.nix2
-rw-r--r--pkgs/applications/audio/audacious/default.nix4
-rw-r--r--pkgs/applications/audio/bristol/default.nix6
-rw-r--r--pkgs/applications/audio/distrho/default.nix6
-rw-r--r--pkgs/applications/audio/eq10q/default.nix4
-rw-r--r--pkgs/applications/audio/jaaa/default.nix2
-rw-r--r--pkgs/applications/audio/qmmp/default.nix4
-rw-r--r--pkgs/applications/audio/rkrlv2/default.nix4
-rw-r--r--pkgs/applications/audio/spotify/default.nix22
-rw-r--r--pkgs/applications/audio/tetraproc/default.nix4
-rw-r--r--pkgs/applications/display-managers/lightdm/default.nix2
-rw-r--r--pkgs/applications/editors/atom/default.nix8
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix4
-rw-r--r--pkgs/applications/editors/lighttable/default.nix6
-rw-r--r--pkgs/applications/editors/nedit/default.nix4
-rw-r--r--pkgs/applications/editors/sublime/default.nix4
-rw-r--r--pkgs/applications/editors/sublime3/default.nix4
-rw-r--r--pkgs/applications/gis/qgis/default.nix4
-rw-r--r--pkgs/applications/graphics/feh/default.nix4
-rw-r--r--pkgs/applications/graphics/gimp/2.8.nix6
-rw-r--r--pkgs/applications/graphics/xfig/default.nix4
-rw-r--r--pkgs/applications/inferno/default.nix4
-rw-r--r--pkgs/applications/kde-apps-15.04/default.nix10
-rw-r--r--pkgs/applications/misc/evilvte/default.nix6
-rw-r--r--pkgs/applications/misc/finalterm/default.nix4
-rw-r--r--pkgs/applications/misc/keepassx/2.0.nix4
-rw-r--r--pkgs/applications/misc/synergy/default.nix4
-rw-r--r--pkgs/applications/misc/wordnet/default.nix4
-rw-r--r--pkgs/applications/misc/xcruiser/default.nix4
-rw-r--r--pkgs/applications/misc/xfe/default.nix4
-rw-r--r--pkgs/applications/misc/xpdf/default.nix6
-rw-r--r--pkgs/applications/networking/browsers/elinks/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/firefox/default.nix12
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/w3m/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/amsn/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/hipchat/default.nix26
-rw-r--r--pkgs/applications/networking/instant-messengers/teamspeak/client.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/tkabber/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/viber/default.nix10
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/default.nix12
-rw-r--r--pkgs/applications/office/mendeley/default.nix4
-rw-r--r--pkgs/applications/office/zotero/default.nix2
-rw-r--r--pkgs/applications/science/math/mathematica/9.nix4
-rw-r--r--pkgs/applications/science/math/mathematica/default.nix4
-rw-r--r--pkgs/applications/science/math/scilab/default.nix10
-rw-r--r--pkgs/applications/science/misc/openmodelica/default.nix4
-rw-r--r--pkgs/applications/version-management/git-and-tools/default.nix4
-rw-r--r--pkgs/applications/video/gnash/default.nix4
-rw-r--r--pkgs/applications/video/mythtv/default.nix4
-rw-r--r--pkgs/applications/video/tvtime/default.nix6
-rw-r--r--pkgs/applications/video/vlc/default.nix4
-rw-r--r--pkgs/applications/video/xine-ui/default.nix6
-rw-r--r--pkgs/applications/virtualization/open-vm-tools/default.nix4
-rw-r--r--pkgs/applications/virtualization/xen/generic.nix4
-rw-r--r--pkgs/applications/window-managers/awesome/default.nix20
-rw-r--r--pkgs/applications/window-managers/ion-3/default.nix4
-rw-r--r--pkgs/applications/window-managers/notion/default.nix4
-rw-r--r--pkgs/applications/window-managers/qtile/default.nix8
-rw-r--r--pkgs/applications/window-managers/weston/default.nix4
-rw-r--r--pkgs/data/documentation/zeal/default.nix4
-rw-r--r--pkgs/desktops/e19/efl.nix16
-rw-r--r--pkgs/desktops/e19/enlightenment.nix6
-rw-r--r--pkgs/desktops/enlightenment/default.nix4
-rw-r--r--pkgs/desktops/gnome-2/platform/gtkglext/default.nix4
-rw-r--r--pkgs/desktops/gnome-2/platform/libgnomeui/default.nix4
-rw-r--r--pkgs/desktops/plasma-5.3/default.nix20
-rw-r--r--pkgs/development/compilers/cudatoolkit/generic.nix4
-rw-r--r--pkgs/development/compilers/ocaml/3.08.0.nix4
-rw-r--r--pkgs/development/compilers/ocaml/3.10.0.nix6
-rw-r--r--pkgs/development/compilers/ocaml/3.11.2.nix6
-rw-r--r--pkgs/development/compilers/ocaml/3.12.1.nix6
-rw-r--r--pkgs/development/compilers/ocaml/4.00.1.nix6
-rw-r--r--pkgs/development/compilers/ocaml/ber-metaocaml-003.nix6
-rw-r--r--pkgs/development/compilers/ocaml/metaocaml-3.09.nix6
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix8
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk6-linux.nix8
-rw-r--r--pkgs/development/haskell-modules/default.nix2
-rw-r--r--pkgs/development/interpreters/erlang/R15.nix6
-rw-r--r--pkgs/development/interpreters/erlang/R16.nix6
-rw-r--r--pkgs/development/interpreters/erlang/R17.nix6
-rw-r--r--pkgs/development/interpreters/erlang/R18.nix6
-rw-r--r--pkgs/development/interpreters/pypy/default.nix4
-rw-r--r--pkgs/development/interpreters/python/2.6/default.nix6
-rw-r--r--pkgs/development/interpreters/python/2.7/default.nix8
-rw-r--r--pkgs/development/interpreters/self/default.nix4
-rw-r--r--pkgs/development/interpreters/xulrunner/default.nix12
-rw-r--r--pkgs/development/libraries/SDL/default.nix6
-rw-r--r--pkgs/development/libraries/SDL2/default.nix6
-rw-r--r--pkgs/development/libraries/Xaw3d/default.nix6
-rw-r--r--pkgs/development/libraries/at-spi2-atk/default.nix4
-rw-r--r--pkgs/development/libraries/cairo/default.nix4
-rw-r--r--pkgs/development/libraries/cairomm/default.nix4
-rw-r--r--pkgs/development/libraries/directfb/default.nix4
-rw-r--r--pkgs/development/libraries/dlib/default.nix6
-rw-r--r--pkgs/development/libraries/fltk/default.nix4
-rw-r--r--pkgs/development/libraries/fltk/fltk13.nix4
-rw-r--r--pkgs/development/libraries/fox/default.nix4
-rw-r--r--pkgs/development/libraries/fox/fox-1.6.nix4
-rw-r--r--pkgs/development/libraries/frame/default.nix4
-rw-r--r--pkgs/development/libraries/freeglut/default.nix4
-rw-r--r--pkgs/development/libraries/geis/default.nix4
-rw-r--r--pkgs/development/libraries/giblib/default.nix4
-rw-r--r--pkgs/development/libraries/glew/default.nix4
-rw-r--r--pkgs/development/libraries/glfw/3.x.nix4
-rw-r--r--pkgs/development/libraries/grail/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix4
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix10
-rw-r--r--pkgs/development/libraries/gtk+/3.x.nix6
-rw-r--r--pkgs/development/libraries/imlib2/default.nix4
-rw-r--r--pkgs/development/libraries/jasper/default.nix2
-rw-r--r--pkgs/development/libraries/kde-frameworks-5.10/default.nix6
-rw-r--r--pkgs/development/libraries/kde-frameworks-5.12/default.nix6
-rw-r--r--pkgs/development/libraries/libclxclient/default.nix6
-rw-r--r--pkgs/development/libraries/libcm/default.nix6
-rw-r--r--pkgs/development/libraries/lirc/default.nix4
-rw-r--r--pkgs/development/libraries/pango/default.nix4
-rw-r--r--pkgs/development/libraries/physics/geant4/default.nix8
-rw-r--r--pkgs/development/libraries/qt-3/default.nix4
-rw-r--r--pkgs/development/libraries/qt-5/5.4/qtbase.nix4
-rw-r--r--pkgs/development/libraries/snack/default.nix4
-rw-r--r--pkgs/development/libraries/wtk/default.nix4
-rw-r--r--pkgs/development/libraries/xcb-util-cursor/HEAD.nix8
-rw-r--r--pkgs/development/pharo/vm/default.nix4
-rw-r--r--pkgs/development/pure-modules/gl/default.nix4
-rw-r--r--pkgs/development/pure-modules/tk/default.nix4
-rw-r--r--pkgs/development/python-modules/pycairo/default.nix4
-rw-r--r--pkgs/development/r-modules/default.nix8
-rw-r--r--pkgs/development/tools/electron/default.nix8
-rw-r--r--pkgs/development/tools/node-webkit/nw11.nix10
-rw-r--r--pkgs/development/tools/node-webkit/nw12.nix10
-rw-r--r--pkgs/development/tools/node-webkit/nw9.nix10
-rw-r--r--pkgs/development/tools/selenium/server/default.nix4
-rw-r--r--pkgs/development/tools/thrust/default.nix8
-rw-r--r--pkgs/games/adom/default.nix4
-rw-r--r--pkgs/games/astromenace/default.nix4
-rw-r--r--pkgs/games/megaglest/default.nix4
-rw-r--r--pkgs/games/minetest/default.nix4
-rw-r--r--pkgs/games/planetaryannihilation/default.nix8
-rw-r--r--pkgs/games/quake3/game/default.nix4
-rw-r--r--pkgs/games/sdlmame/default.nix4
-rw-r--r--pkgs/games/snake4/default.nix4
-rw-r--r--pkgs/games/spring/default.nix4
-rw-r--r--pkgs/games/steam/chrootenv.nix36
-rw-r--r--pkgs/games/ue4demos/default.nix4
-rw-r--r--pkgs/games/ut2004demo/default.nix4
-rw-r--r--pkgs/games/voxelands/default.nix4
-rw-r--r--pkgs/games/zoom/default.nix6
-rw-r--r--pkgs/misc/emulators/snes9x-gtk/default.nix4
-rw-r--r--pkgs/misc/emulators/wine/base.nix4
-rw-r--r--pkgs/misc/ghostscript/default.nix6
-rw-r--r--pkgs/misc/screensavers/electricsheep/default.nix4
-rw-r--r--pkgs/misc/screensavers/rss-glx/default.nix4
-rw-r--r--pkgs/misc/screensavers/xautolock/default.nix4
-rw-r--r--pkgs/misc/screensavers/xtrlock-pam/default.nix4
-rw-r--r--pkgs/misc/themes/qtcurve/default.nix4
-rw-r--r--pkgs/os-specific/linux/ati-drivers/default.nix6
-rw-r--r--pkgs/os-specific/linux/conky/default.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/beta.nix8
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix8
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy173.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy304.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy340.nix8
-rw-r--r--pkgs/os-specific/linux/opengl/xorg-sys/default.nix4
-rw-r--r--pkgs/servers/pulseaudio/default.nix4
-rw-r--r--pkgs/tools/X11/primus/lib.nix4
-rw-r--r--pkgs/tools/X11/vdpauinfo/default.nix2
-rw-r--r--pkgs/tools/X11/xbrightness/default.nix16
-rw-r--r--pkgs/tools/X11/xinput_calibrator/default.nix4
-rw-r--r--pkgs/tools/X11/xrestop/default.nix4
-rw-r--r--pkgs/tools/admin/tightvnc/default.nix4
-rw-r--r--pkgs/tools/audio/pasystray/default.nix4
-rw-r--r--pkgs/tools/graphics/glmark2/default.nix4
-rw-r--r--pkgs/tools/graphics/glxinfo/default.nix4
-rw-r--r--pkgs/tools/graphics/graphviz/2.0.nix6
-rw-r--r--pkgs/tools/graphics/graphviz/2.32.nix6
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix10
-rw-r--r--pkgs/tools/graphics/scrot/default.nix4
-rw-r--r--pkgs/tools/inputmethods/touchegg/default.nix4
-rw-r--r--pkgs/tools/misc/antimicro/default.nix4
-rw-r--r--pkgs/tools/misc/ocz-ssd-guru/default.nix12
-rw-r--r--pkgs/tools/misc/pipelight/default.nix4
-rw-r--r--pkgs/tools/misc/unclutter/default.nix4
-rw-r--r--pkgs/tools/misc/xclip/default.nix4
-rw-r--r--pkgs/tools/misc/xsel/default.nix4
-rw-r--r--pkgs/tools/networking/x11-ssh-askpass/default.nix4
-rw-r--r--pkgs/tools/security/tor/torbrowser.nix6
-rw-r--r--pkgs/top-level/all-packages.nix32
-rw-r--r--pkgs/top-level/perl-packages.nix18
-rw-r--r--pkgs/top-level/python-packages.nix14
192 files changed, 566 insertions, 578 deletions
diff --git a/doc/functions.xml b/doc/functions.xml
index 3e4ac3f3c6b1..7fd30cabf16b 100644
--- a/doc/functions.xml
+++ b/doc/functions.xml
@@ -248,7 +248,7 @@ c = lib.makeOverridable f { a = 1; b = 2; }</programlisting>
   targetPkgs = pkgs: (with pkgs;
     [ udev
       alsaLib
-    ]) ++ (with pkgs.xlibs;
+    ]) ++ (with pkgs.xorg;
     [ libX11
       libXcursor
       libXrandr
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix
index 887b6f88a741..c9a563768323 100644
--- a/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixos/modules/services/x11/display-managers/gdm.nix
@@ -106,7 +106,7 @@ in
     systemd.services.display-manager.wants = [ "systemd-machined.service" ];
     systemd.services.display-manager.after = [ "systemd-machined.service" ];
 
-    systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou pkgs.xlibs.xhost pkgs.dbus_tools ];
+    systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou pkgs.xorg.xhost pkgs.dbus_tools ];
 
     services.dbus.packages = [ gdm ];
 
diff --git a/nixos/modules/services/x11/display-managers/kdm.nix b/nixos/modules/services/x11/display-managers/kdm.nix
index d0b69c5452c2..558f5e8cfc7e 100644
--- a/nixos/modules/services/x11/display-managers/kdm.nix
+++ b/nixos/modules/services/x11/display-managers/kdm.nix
@@ -19,7 +19,7 @@ let
       ''}
 
       [X-*-Core]
-      Xrdb=${pkgs.xlibs.xrdb}/bin/xrdb
+      Xrdb=${pkgs.xorg.xrdb}/bin/xrdb
       SessionsDirs=${dmcfg.session.desktops}
       Session=${dmcfg.session.script}
       FailsafeClient=${pkgs.xterm}/bin/xterm
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index 3ab113c92e89..9476fbaf3359 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, glib, gtk3, libmowgli, libmcs
-, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
+, gettext, dbus_glib, libxml2, libmad, xorg, alsaLib, libogg
 , libvorbis, libcdio, libcddb, flac, ffmpeg, makeWrapper
 , mpg123, neon, faad2
 }:
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
 
   buildInputs =
     [ gettext pkgconfig glib gtk3 libmowgli libmcs libxml2 dbus_glib
-      libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
+      libmad xorg.libXcomposite libogg libvorbis flac alsaLib libcdio
       libcddb ffmpeg makeWrapper mpg123 neon faad2
     ];
 
diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix
index db1f7895f4b9..e19acab36b5a 100644
--- a/pkgs/applications/audio/bristol/default.nix
+++ b/pkgs/applications/audio/bristol/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, alsaLib, libjack2, pkgconfig, libpulseaudio, xlibs }:
+{ stdenv, fetchurl, alsaLib, libjack2, pkgconfig, libpulseaudio, xorg }:
 
 stdenv.mkDerivation  rec {
   name = "bristol-${version}";
@@ -10,8 +10,8 @@ stdenv.mkDerivation  rec {
   };
 
   buildInputs = [
-    alsaLib libjack2 pkgconfig libpulseaudio xlibs.libX11 xlibs.libXext
-    xlibs.xproto
+    alsaLib libjack2 pkgconfig libpulseaudio xorg.libX11 xorg.libXext
+    xorg.xproto
   ];
 
   preInstall = ''
diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix
index a590716537bc..72893dfb19a1 100644
--- a/pkgs/applications/audio/distrho/default.nix
+++ b/pkgs/applications/audio/distrho/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, alsaLib, fftwSinglePrec, freetype, libjack2
-, libxslt, lv2, pkgconfig, premake3, xlibs, ladspa-sdk }:
+, libxslt, lv2, pkgconfig, premake3, xorg, ladspa-sdk }:
 
 stdenv.mkDerivation rec {
   name = "distrho-ports-git-2015-07-18";
@@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     alsaLib fftwSinglePrec freetype libjack2 pkgconfig premake3
-    xlibs.libX11 xlibs.libXcomposite xlibs.libXcursor xlibs.libXext
-    xlibs.libXinerama xlibs.libXrender ladspa-sdk
+    xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
+    xorg.libXinerama xorg.libXrender ladspa-sdk
   ];
 
   buildPhase = ''
diff --git a/pkgs/applications/audio/eq10q/default.nix b/pkgs/applications/audio/eq10q/default.nix
index 61c979534229..5d5b70a58985 100644
--- a/pkgs/applications/audio/eq10q/default.nix
+++ b/pkgs/applications/audio/eq10q/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, fftw, gtkmm, libxcb, lv2, pkgconfig, xlibs }:
+{ stdenv, fetchurl, cmake, fftw, gtkmm, libxcb, lv2, pkgconfig, xorg }:
 stdenv.mkDerivation rec {
   name = "eq10q-2-${version}";
   version = "beta7.1";
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
     sha256 = "1jmrcx4jlx8kgsy5n4jcxa6qkjqvx7d8l2p7dsmw4hj20s39lgyi";
   };
 
-  buildInputs = [ cmake fftw gtkmm libxcb lv2 pkgconfig xlibs.libpthreadstubs xlibs.libXdmcp xlibs.libxshmfence ];
+  buildInputs = [ cmake fftw gtkmm libxcb lv2 pkgconfig xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence ];
 
   installFlags = ''
     DESTDIR=$(out)
diff --git a/pkgs/applications/audio/jaaa/default.nix b/pkgs/applications/audio/jaaa/default.nix
index 0427283d54df..b0fbced22113 100644
--- a/pkgs/applications/audio/jaaa/default.nix
+++ b/pkgs/applications/audio/jaaa/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, alsaLib, libclthreads, libclxclient, libX11, libXft, libXrender, fftwFloat, freetype, fontconfig, libjack2, xlibs, zita-alsa-pcmi }:
+{ stdenv, fetchurl, alsaLib, libclthreads, libclxclient, libX11, libXft, libXrender, fftwFloat, freetype, fontconfig, libjack2, xorg, zita-alsa-pcmi }:
 
 stdenv.mkDerivation rec {
   name = "jaaa-${version}";
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
index 1b9323c1a7ba..5bec7aa6dd04 100644
--- a/pkgs/applications/audio/qmmp/default.nix
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, qt4, pkgconfig, x11
+{ stdenv, fetchurl, cmake, qt4, pkgconfig, xlibsWrapper
 # transports
 , curl, libmms
 # input plugins
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ # basic requirements
-      cmake qt4 pkgconfig x11
+      cmake qt4 pkgconfig xlibsWrapper
       # transports
       curl libmms
       # input plugins
diff --git a/pkgs/applications/audio/rkrlv2/default.nix b/pkgs/applications/audio/rkrlv2/default.nix
index 9c41c88b0123..084d187c347c 100644
--- a/pkgs/applications/audio/rkrlv2/default.nix
+++ b/pkgs/applications/audio/rkrlv2/default.nix
@@ -1,5 +1,5 @@
 { stdenv, pkgs, fetchFromGitHub,
-automake, pkgconfig, lv2, fftw, cmake, xlibs, libjack2, libsamplerate, libsndfile
+automake, pkgconfig, lv2, fftw, cmake, xorg, libjack2, libsamplerate, libsndfile
 }:
 
 stdenv.mkDerivation rec {
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "0kr3rvq7n1bh47qryyarcpiibms601qd8l1vypmm61969l4d4bn8";
   };
 
-  buildInputs = with xlibs; [ automake pkgconfig lv2 fftw cmake libXpm libjack2 libsamplerate libsndfile libXft ];
+  buildInputs = with xorg; [ automake pkgconfig lv2 fftw cmake libXpm libjack2 libsamplerate libsndfile libXft ];
 
   meta = {
     description = "Rakarrak effects ported to LV2";
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index 005b3e1b60d3..2868d7609738 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype
+{ fetchurl, stdenv, dpkg, xorg, qt4, alsaLib, makeWrapper, openssl, freetype
 , glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf
 , libgcrypt, chromium, udev, fontconfig
 , dbus, expat }:
@@ -28,16 +28,16 @@ let
     qt4
     stdenv.cc.cc
     udev
-    xlibs.libX11
-    xlibs.libXcomposite
-    xlibs.libXdamage
-    xlibs.libXext
-    xlibs.libXfixes
-    xlibs.libXi
-    xlibs.libXrandr
-    xlibs.libXrender
-    xlibs.libXrender
-    xlibs.libXScrnSaver
+    xorg.libX11
+    xorg.libXcomposite
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXrender
+    xorg.libXScrnSaver
   ];
 
 in
diff --git a/pkgs/applications/audio/tetraproc/default.nix b/pkgs/applications/audio/tetraproc/default.nix
index a107dd9794b1..d450cce7b86f 100644
--- a/pkgs/applications/audio/tetraproc/default.nix
+++ b/pkgs/applications/audio/tetraproc/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, makeWrapper
 , expat, fftwFloat, fontconfig, freetype, libjack2, jack2Full, libclthreads, libclxclient
-, libsndfile, libxcb, xlibs
+, libsndfile, libxcb, xorg
 }:
 
 stdenv.mkDerivation rec {
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     expat libjack2 libclthreads libclxclient fftwFloat fontconfig libsndfile freetype
-    libxcb xlibs.libX11 xlibs.libXau xlibs.libXdmcp xlibs.libXft xlibs.libXrender
+    libxcb xorg.libX11 xorg.libXau xorg.libXdmcp xorg.libXft xorg.libXrender
   ];
 
   makeFlags = [
diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix
index 457d8c4b0caa..fb3235370206 100644
--- a/pkgs/applications/display-managers/lightdm/default.nix
+++ b/pkgs/applications/display-managers/lightdm/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pam, pkgconfig, libxcb, glib, libXdmcp, itstool, libxml2
-, intltool, x11, libxklavier, libgcrypt, libaudit
+, intltool, xlibsWrapper, libxklavier, libgcrypt, libaudit
 , qt4 ? null, qt5 ? null
 }:
 
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index 4de862b0254b..9bcad5b7649d 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
 , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
-, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs, libcap, systemd
+, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, systemd
 }:
 
 let
@@ -9,9 +9,9 @@ let
     paths = [
       stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
       fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
-      xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
-      xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
-      xlibs.libXcursor libcap systemd
+      xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
+      xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
+      xorg.libXcursor libcap systemd
     ];
   };
 in stdenv.mkDerivation rec {
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index 6c52a8991089..368b06b17e07 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d
+{ stdenv, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
 , pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
 , libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
 , alsaLib, cairo, acl, gpm
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
     [ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo acl gpm gettext ]
     ++ stdenv.lib.optional stdenv.isLinux dbus
     ++ stdenv.lib.optionals withX
-      [ x11 libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
+      [ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
         imagemagick gconf ]
     ++ stdenv.lib.optional (withX && withGTK2) gtk2
     ++ stdenv.lib.optional (withX && withGTK3) gtk3
diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix
index 6db7130896f5..6dbeff55063c 100644
--- a/pkgs/applications/editors/lighttable/default.nix
+++ b/pkgs/applications/editors/lighttable/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
 , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
-, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xlibs, udev
+, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, udev
 }:
 
 let
   libPath = stdenv.lib.makeLibraryPath [
       stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
       fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf
-      xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
-      xlibs.libXcomposite xlibs.libXi xlibs.libXfixes
+      xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
+      xorg.libXcomposite xorg.libXi xorg.libXfixes
 ];
 in
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
diff --git a/pkgs/applications/editors/nedit/default.nix b/pkgs/applications/editors/nedit/default.nix
index a4dfc4719dc4..56a8ac62025f 100644
--- a/pkgs/applications/editors/nedit/default.nix
+++ b/pkgs/applications/editors/nedit/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, motif, libXpm }:
+{ stdenv, fetchurl, xlibsWrapper, motif, libXpm }:
 
 assert stdenv.isLinux;
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "023hwpqc57mnzvg6p7jda6193afgjzxzajlhwhqvk3jq2kdv6zna";
   };
 
-  buildInputs = [ x11 motif libXpm ];
+  buildInputs = [ xlibsWrapper motif libXpm ];
 
   buildFlags = if stdenv.isLinux then "linux" else "";
 
diff --git a/pkgs/applications/editors/sublime/default.nix b/pkgs/applications/editors/sublime/default.nix
index ffa1c4eed34b..c7b0f9864c9a 100644
--- a/pkgs/applications/editors/sublime/default.nix
+++ b/pkgs/applications/editors/sublime/default.nix
@@ -1,6 +1,6 @@
-{ fetchurl, stdenv, glib, xlibs, cairo, gtk}:
+{ fetchurl, stdenv, glib, xorg, cairo, gtk}:
 let
-  libPath = stdenv.lib.makeLibraryPath [glib xlibs.libX11 gtk cairo];
+  libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk cairo];
 in
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 
diff --git a/pkgs/applications/editors/sublime3/default.nix b/pkgs/applications/editors/sublime3/default.nix
index 1764c85ca7dd..b26d27a8bc51 100644
--- a/pkgs/applications/editors/sublime3/default.nix
+++ b/pkgs/applications/editors/sublime3/default.nix
@@ -1,10 +1,10 @@
-{ fetchurl, stdenv, glib, xlibs, cairo, gtk, pango, makeWrapper, openssl, bzip2 }:
+{ fetchurl, stdenv, glib, xorg, cairo, gtk, pango, makeWrapper, openssl, bzip2 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 
 let
   build = "3083";
-  libPath = stdenv.lib.makeLibraryPath [glib xlibs.libX11 gtk cairo pango];
+  libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk cairo pango];
 in let
   # package with just the binaries
   sublime = stdenv.mkDerivation {
diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix
index 98663a946ae5..8d9771c91348 100644
--- a/pkgs/applications/gis/qgis/default.nix
+++ b/pkgs/applications/gis/qgis/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, x11, sqlite, gsl,
+{ stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl,
   qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "qgis-2.10.1";
 
-  buildInputs = [ gdal qt4 flex bison proj geos x11 sqlite gsl qwt qscintilla
+  buildInputs = [ gdal qt4 flex bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
     fcgi libspatialindex libspatialite postgresql ] ++
     (with pythonPackages; [ numpy psycopg2 ]) ++ [ pythonPackages.qscintilla ];
 
diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix
index ac0a2ec0d4c9..266f70e3008f 100644
--- a/pkgs/applications/graphics/feh/default.nix
+++ b/pkgs/applications/graphics/feh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeWrapper, fetchurl, x11, imlib2, libjpeg, libpng
+{ stdenv, makeWrapper, fetchurl, xlibsWrapper, imlib2, libjpeg, libpng
 , libXinerama, curl, libexif }:
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1059mflgw8hl398lwy55fj50a98xryvdf23wkpbn4s0z9388hl46";
   };
 
-  buildInputs = [ makeWrapper x11 imlib2 libjpeg libpng libXinerama curl libexif ];
+  buildInputs = [ makeWrapper xlibsWrapper imlib2 libjpeg libpng libXinerama curl libexif ];
 
   preBuild = ''
     makeFlags="PREFIX=$out exif=1"
diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix
index 83f409457fbb..7c394ae11c6f 100644
--- a/pkgs/applications/graphics/gimp/2.8.nix
+++ b/pkgs/applications/graphics/gimp/2.8.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, intltool, babl, gegl, gtk, glib, gdk_pixbuf
 , pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, libtiff
 , webkit, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, jasper
-, python, pygtk, libart_lgpl, libexif, gettext, xlibs, wrapPython }:
+, python, pygtk, libart_lgpl, libexif, gettext, xorg, wrapPython }:
 
 stdenv.mkDerivation rec {
   name = "gimp-2.8.14";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
     [ pkgconfig intltool babl gegl gtk glib gdk_pixbuf pango cairo
       freetype fontconfig lcms libpng libjpeg poppler libtiff webkit
       libmng librsvg libwmf zlib libzip ghostscript aalib jasper
-      python pygtk libart_lgpl libexif gettext xlibs.libXpm
+      python pygtk libart_lgpl libexif gettext xorg.libXpm
       wrapPython
     ];
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   #configureFlags = [ "--disable-print" ];
 
   # "screenshot" needs this.
-  NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib"
+  NIX_LDFLAGS = "-rpath ${xorg.libX11}/lib"
     + stdenv.lib.optionalString stdenv.isDarwin " -lintl";
 
   meta = {
diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix
index 88183c5e5a3b..9e53fe3efe2c 100644
--- a/pkgs/applications/graphics/xfig/default.nix
+++ b/pkgs/applications/graphics/xfig/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, makeWrapper, imake
-, x11, libXpm, libXmu, libXi, libXp, Xaw3d, libpng, libjpeg}:
+, xlibsWrapper, libXpm, libXmu, libXi, libXp, Xaw3d, libpng, libjpeg}:
 
 let version = "3.2.5b"; in
 stdenv.mkDerivation {
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   builder = ./builder.sh;
 
-  buildInputs = [x11 libXpm libXmu libXi libXp Xaw3d libpng libjpeg];
+  buildInputs = [xlibsWrapper libXpm libXmu libXi libXp Xaw3d libpng libjpeg];
 
   nativeBuildInputs = [ imake makeWrapper ];
 
diff --git a/pkgs/applications/inferno/default.nix b/pkgs/applications/inferno/default.nix
index 0d61d5635a51..a0e2796a3025 100644
--- a/pkgs/applications/inferno/default.nix
+++ b/pkgs/applications/inferno/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, fetchhg, stdenv, xlibs, gcc46, makeWrapper }:
+{ fetchurl, fetchhg, stdenv, xorg, gcc46, makeWrapper }:
 
 stdenv.mkDerivation rec {
   # Inferno is a rolling release from a mercurial repository. For the verison number
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   };
 
   # Fails with gcc48 due to inferno triggering an optimisation issue with floating point.
-  buildInputs = [ gcc46 xlibs.libX11 xlibs.libXpm xlibs.libXext xlibs.xextproto makeWrapper ];
+  buildInputs = [ gcc46 xorg.libX11 xorg.libXpm xorg.libXext xorg.xextproto makeWrapper ];
 
   infernoWrapper = ./inferno;
 
diff --git a/pkgs/applications/kde-apps-15.04/default.nix b/pkgs/applications/kde-apps-15.04/default.nix
index 83aca36bc003..d1f909edf09e 100644
--- a/pkgs/applications/kde-apps-15.04/default.nix
+++ b/pkgs/applications/kde-apps-15.04/default.nix
@@ -174,7 +174,7 @@ let
               libvncserver libical networkmanager openal opencv
               openexr perl phonon pkgconfig polkit_qt4 prison python qca2
               qimageblitz qjson qt4 samba saneBackends soprano speechd
-              strigi taglib udev xlibs xplanet xscreensaver xz;
+              strigi taglib udev xorg xplanet xscreensaver xz;
       alsa = alsaLib;
       assuan = libassuan;
       boost = boost156;
@@ -289,7 +289,7 @@ let
       kde-wallpapers = kde4Package super.kde-wallpapers;
 
       kde-workspace = extendDerivation (kde4Package super.kde-workspace) {
-        buildInputs = with scope.xlibs; [
+        buildInputs = with scope.xorg; [
             libxkbfile libXcomposite xcbutilimage xcbutilkeysyms xcbutilrenderutil
         ];
         nativeBuildInputs = [ scope.pkgconfig ];
@@ -385,7 +385,7 @@ let
       };
 
       kmousetool = extendDerivation (kde4Package super.kmousetool) {
-        buildInputs = with scope.xlibs; [ libXtst libXt ];
+        buildInputs = with scope.xorg; [ libXtst libXt ];
       };
 
       kmouth = kde4Package super.kmouth;
@@ -407,13 +407,13 @@ let
       krdc = kde4Package super.krdc;
 
       kremotecontrol = extendDerivation (kde4Package super.kremotecontrol) {
-        buildInputs = [ scope.xlibs.libXtst ];
+        buildInputs = [ scope.xorg.libXtst ];
       };
 
       kreversi = kde4Package super.kreversi;
 
       krfb = extendDerivation (kde4Package super.krfb) {
-        buildInputs = with scope; [ xlibs.libXtst ktp-common-internals ];
+        buildInputs = with scope; [ xorg.libXtst ktp-common-internals ];
       };
 
       ksaneplugin = kde4Package super.ksaneplugin;
diff --git a/pkgs/applications/misc/evilvte/default.nix b/pkgs/applications/misc/evilvte/default.nix
index 5921cc308b5b..f7a8fe4eafc2 100644
--- a/pkgs/applications/misc/evilvte/default.nix
+++ b/pkgs/applications/misc/evilvte/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, makeWrapper, pkgconfig,
-  gnome, glib, pango, cairo, gdk_pixbuf, atk, freetype, xlibs,
+  gnome, glib, pango, cairo, gdk_pixbuf, atk, freetype, xorg,
   configH
 }:
 
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    gnome.vte glib pango gnome.gtk cairo gdk_pixbuf atk freetype xlibs.libX11
-    xlibs.xproto xlibs.kbproto xlibs.libXext xlibs.xextproto makeWrapper pkgconfig
+    gnome.vte glib pango gnome.gtk cairo gdk_pixbuf atk freetype xorg.libX11
+    xorg.xproto xorg.kbproto xorg.libXext xorg.xextproto makeWrapper pkgconfig
   ];
 
   buildPhase = ''
diff --git a/pkgs/applications/misc/finalterm/default.nix b/pkgs/applications/misc/finalterm/default.nix
index bdd1a9e8e28e..c8e8bb01e5d6 100644
--- a/pkgs/applications/misc/finalterm/default.nix
+++ b/pkgs/applications/misc/finalterm/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, fetchgit, makeWrapper
 , pkgconfig, cmake, libxml2, vala, intltool, libmx, gnome3, gtk3, gtk_doc
 , keybinder3, clutter_gtk, libnotify
-, libxkbcommon, xlibs, udev
+, libxkbcommon, xorg, udev
 , bashInteractive
 }:
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   buildInputs = [
     pkgconfig cmake vala intltool gtk3 gnome3.gnome_common gnome3.libgee
     gtk_doc clutter_gtk libmx keybinder3 libxml2 libnotify makeWrapper
-    xlibs.libpthreadstubs xlibs.libXdmcp xlibs.libxshmfence
+    xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence
     libxkbcommon
   ] ++ lib.optionals stdenv.isLinux [
     udev
diff --git a/pkgs/applications/misc/keepassx/2.0.nix b/pkgs/applications/misc/keepassx/2.0.nix
index 6a5ce9fd6043..acdd91aaf68a 100644
--- a/pkgs/applications/misc/keepassx/2.0.nix
+++ b/pkgs/applications/misc/keepassx/2.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, libgcrypt, qt4, xlibs, ... }:
+{ stdenv, fetchurl, cmake, libgcrypt, qt4, xorg, ... }:
 
 stdenv.mkDerivation {
   name = "keepassx2-2.0beta2";
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
     sha256 = "0ljf9ws3wh62zd0gyb0vk2qw6pqsmxrlybrfs5mqahf44q92ca2q";
   };
 
-  buildInputs = [ cmake libgcrypt qt4 xlibs.libXtst ];
+  buildInputs = [ cmake libgcrypt qt4 xorg.libXtst ];
 
   meta = {
     description = "Qt password manager compatible with its Win32 and Pocket PC versions";
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix
index c010047845fc..ac60d9285876 100644
--- a/pkgs/applications/misc/synergy/default.nix
+++ b/pkgs/applications/misc/synergy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, x11, libX11, libXi, libXtst, libXrandr
+{ stdenv, fetchFromGitHub, cmake, xlibsWrapper, libX11, libXi, libXtst, libXrandr
 , xinput, curl, openssl, unzip }:
 
 with stdenv.lib;
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildInputs = [
-    cmake x11 libX11 libXi libXtst libXrandr xinput curl openssl
+    cmake xlibsWrapper libX11 libXi libXtst libXrandr xinput curl openssl
   ];
 
   installPhase = ''
diff --git a/pkgs/applications/misc/wordnet/default.nix b/pkgs/applications/misc/wordnet/default.nix
index c70436e68f99..b244e9c1bfce 100644
--- a/pkgs/applications/misc/wordnet/default.nix
+++ b/pkgs/applications/misc/wordnet/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, tcl, tk, x11, makeWrapper}:
+{stdenv, fetchurl, tcl, tk, xlibsWrapper, makeWrapper}:
 
 let version = "3.0"; in
 stdenv.mkDerivation {
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc";
   };
 
-  buildInputs = [tcl tk x11 makeWrapper];
+  buildInputs = [tcl tk xlibsWrapper makeWrapper];
 
   patchPhase = ''
     sed "13i#define USE_INTERP_RESULT 1" -i src/stubs.c
diff --git a/pkgs/applications/misc/xcruiser/default.nix b/pkgs/applications/misc/xcruiser/default.nix
index 15202a1e90c6..f580c41c0a4d 100644
--- a/pkgs/applications/misc/xcruiser/default.nix
+++ b/pkgs/applications/misc/xcruiser/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gccmakedep, xlibs }:
+{ stdenv, fetchurl, gccmakedep, xorg }:
 
 stdenv.mkDerivation {
   name = "xcruiser-0.30";
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
       sha256 = "1r8whva38xizqdh7jmn6wcmfmsndc67pkw22wzfzr6rq0vf6hywi";
     };
 
-  buildInputs = with xlibs; [ gccmakedep imake libXt libXaw libXpm libXext ];
+  buildInputs = with xorg; [ gccmakedep imake libXt libXaw libXpm libXext ];
 
   configurePhase = "xmkmf -a";
 
diff --git a/pkgs/applications/misc/xfe/default.nix b/pkgs/applications/misc/xfe/default.nix
index 5055ac50089d..0ea1159208f4 100644
--- a/pkgs/applications/misc/xfe/default.nix
+++ b/pkgs/applications/misc/xfe/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fox, pkgconfig, gettext, x11, gcc, intltool, file, libpng }:
+{ stdenv, fetchurl, fox, pkgconfig, gettext, xlibsWrapper, gcc, intltool, file, libpng }:
 
 stdenv.mkDerivation rec {
   name = "xfe-1.37";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "1g9a0bpny2m7ixgxpqjh0wvh2x6d0lpj6682zn5dfqwan4j2xfsd";
   };
 
-  buildInputs = [ fox pkgconfig gettext x11 gcc intltool file libpng ];
+  buildInputs = [ fox pkgconfig gettext xlibsWrapper gcc intltool file libpng ];
 
   preConfigure = ''
     sed -i s,/usr/share/xfe,$out/share/xfe, src/xfedefs.h
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix
index 2e690dcce090..e677164ecf48 100644
--- a/pkgs/applications/misc/xpdf/default.nix
+++ b/pkgs/applications/misc/xpdf/default.nix
@@ -1,9 +1,9 @@
 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false
-, stdenv, fetchurl, zlib, libpng, x11 ? null, motif ? null, freetype ? null, t1lib ? null
+, stdenv, fetchurl, zlib, libpng, xlibsWrapper ? null, motif ? null, freetype ? null, t1lib ? null
 , base14Fonts ? null
 }:
 
-assert enableGUI -> x11 != null && motif != null && freetype != null;
+assert enableGUI -> xlibsWrapper != null && motif != null && freetype != null;
 assert enablePDFtoPPM -> freetype != null;
 assert useT1Lib -> t1lib != null;
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [ zlib libpng ] ++
-    stdenv.lib.optionals enableGUI [x11 motif] ++
+    stdenv.lib.optionals enableGUI [xlibsWrapper motif] ++
     stdenv.lib.optional useT1Lib t1lib ++
     stdenv.lib.optional enablePDFtoPPM freetype;
 
diff --git a/pkgs/applications/networking/browsers/elinks/default.nix b/pkgs/applications/networking/browsers/elinks/default.nix
index 0e4fd4db1ba8..1a698b0effda 100644
--- a/pkgs/applications/networking/browsers/elinks/default.nix
+++ b/pkgs/applications/networking/browsers/elinks/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, ncurses, x11, bzip2, zlib, openssl
+{ stdenv, fetchurl, perl, ncurses, xlibsWrapper, bzip2, zlib, openssl
 , spidermonkey, gpm
 , enableGuile ? false, guile ? null   # Incompatible licenses, LGPLv3 - GPLv2
 , enablePython ? false, python ? null
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./gc-init.patch ];
 
-  buildInputs = [ perl ncurses x11 bzip2 zlib openssl spidermonkey gpm ]
+  buildInputs = [ perl ncurses xlibsWrapper bzip2 zlib openssl spidermonkey gpm ]
     ++ stdenv.lib.optional enableGuile guile
     ++ stdenv.lib.optional enablePython python;
 
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index ea9d03f321e0..ce5eac7a2ff8 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, pkgconfig, gtk, gtk3, pango, perl, python, zip, libIDL
-, libjpeg, zlib, dbus, dbus_glib, bzip2, xlibs
+, libjpeg, zlib, dbus, dbus_glib, bzip2, xorg
 , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
 , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
 , hunspell, libevent, libstartup_notification, libvpx
@@ -41,11 +41,11 @@ common = { pname, version, sha1 }: stdenv.mkDerivation rec {
 
   buildInputs =
     [ pkgconfig gtk perl zip libIDL libjpeg zlib bzip2
-      python dbus dbus_glib pango freetype fontconfig xlibs.libXi
-      xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
-      alsaLib nspr nss libnotify xlibs.pixman yasm mesa
-      xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
-      xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
+      python dbus dbus_glib pango freetype fontconfig xorg.libXi
+      xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
+      alsaLib nspr nss libnotify xorg.pixman yasm mesa
+      xorg.libXScrnSaver xorg.scrnsaverproto pysqlite
+      xorg.libXext xorg.xextproto sqlite unzip makeWrapper
       hunspell libevent libstartup_notification libvpx /* cairo */
       gstreamer gst_plugins_base icu libpng jemalloc
       libpulseaudio # only headers are needed
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
index 05e3a8bf613a..ba40925e1d1e 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, glib, dbus, dbus_glib, browser, x11
+{ stdenv, fetchurl, pkgconfig, glib, dbus, dbus_glib, browser, xlibsWrapper
 , GConf, gnome_mplayer, mplayer, gmtk
 }:
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "913fd39e70c564cb210c2544a88869f9d1a448184421f000b14b2bc5ba718b49";
   };
 
-  buildInputs = [ pkgconfig glib dbus dbus_glib browser x11 GConf browser gmtk ];
+  buildInputs = [ pkgconfig glib dbus dbus_glib browser xlibsWrapper GConf browser gmtk ];
 
   # !!! fix this
   preBuild =
diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix
index ade28b519bc5..d8c421af46a8 100644
--- a/pkgs/applications/networking/browsers/w3m/default.nix
+++ b/pkgs/applications/networking/browsers/w3m/default.nix
@@ -3,12 +3,12 @@
 , graphicsSupport ? false
 , mouseSupport ? false
 , ncurses, openssl ? null, boehmgc, gettext, zlib
-, imlib2 ? null, x11 ? null, fbcon ? null
+, imlib2 ? null, xlibsWrapper ? null, fbcon ? null
 , gpm-ncurses ? null
 }:
 
 assert sslSupport -> openssl != null;
-assert graphicsSupport -> imlib2 != null && (x11 != null || fbcon != null);
+assert graphicsSupport -> imlib2 != null && (xlibsWrapper != null || fbcon != null);
 assert mouseSupport -> gpm-ncurses != null;
 
 stdenv.mkDerivation rec {
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ncurses boehmgc gettext zlib]
     ++ stdenv.lib.optional sslSupport openssl
     ++ stdenv.lib.optional mouseSupport gpm-ncurses
-    ++ stdenv.lib.optionals graphicsSupport [imlib2 x11 fbcon];
+    ++ stdenv.lib.optionals graphicsSupport [imlib2 xlibsWrapper fbcon];
 
   configureFlags = "--with-ssl=${openssl} --with-gc=${boehmgc}"
     + stdenv.lib.optionalString graphicsSupport " --enable-image=x11,fb";
diff --git a/pkgs/applications/networking/instant-messengers/amsn/default.nix b/pkgs/applications/networking/instant-messengers/amsn/default.nix
index 37c0b4a694dd..770f0952e1fc 100644
--- a/pkgs/applications/networking/instant-messengers/amsn/default.nix
+++ b/pkgs/applications/networking/instant-messengers/amsn/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, which, tcl, tk, x11, libpng, libjpeg, makeWrapper}:
+{stdenv, fetchurl, which, tcl, tk, xlibsWrapper, libpng, libjpeg, makeWrapper}:
 
 stdenv.mkDerivation {
   name = "amsn-0.98.9";
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
 
   configureFlags = "--with-tcl=${tcl}/lib --with-tk=${tk}/lib --enable-static";
 
-  buildInputs = [which tcl tk x11 libpng libjpeg makeWrapper];
+  buildInputs = [which tcl tk xlibsWrapper libpng libjpeg makeWrapper];
 
   postInstall = ''
     wrapProgram $out/bin/amsn --prefix PATH : ${tk}/bin
diff --git a/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
index c6551307df9d..6dc0df03eef8 100644
--- a/pkgs/applications/networking/instant-messengers/hipchat/default.nix
+++ b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libtool, xlibs, freetype, fontconfig, openssl, glib
+{ stdenv, fetchurl, libtool, xorg, freetype, fontconfig, openssl, glib
 , mesa, gstreamer, gst_plugins_base, dbus, alsaLib, zlib, libuuid
 , libxml2, libxslt, sqlite, libogg, libvorbis, xz, libcanberra
 , makeWrapper, libredirect, xkeyboard_config, xcbutilkeysyms }:
@@ -10,18 +10,18 @@ let
   rpath = stdenv.lib.makeSearchPath "lib" [
     stdenv.glibc
     libtool
-    xlibs.libXext
-    xlibs.libSM
-    xlibs.libICE
-    xlibs.libX11
-    xlibs.libXft
-    xlibs.libXau
-    xlibs.libXdmcp
-    xlibs.libXrender
-    xlibs.libXfixes
-    xlibs.libXcomposite
-    xlibs.libxcb
-    xlibs.libXi
+    xorg.libXext
+    xorg.libSM
+    xorg.libICE
+    xorg.libX11
+    xorg.libXft
+    xorg.libXau
+    xorg.libXdmcp
+    xorg.libXrender
+    xorg.libXfixes
+    xorg.libXcomposite
+    xorg.libxcb
+    xorg.libXi
     freetype
     fontconfig
     openssl
diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
index 13798061b71b..ece4b9f0e013 100644
--- a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
+++ b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype
-, xorg, fontconfig, xlibs, qt5, xkeyboard_config, alsaLib, libpulseaudio ? null
+, xorg, fontconfig, qt5, xkeyboard_config, alsaLib, libpulseaudio ? null
 , libredirect, quazip, less, which, unzip
 }:
 
@@ -12,7 +12,7 @@ let
   deps =
     [ zlib glib libpng freetype xorg.libSM xorg.libICE xorg.libXrender
       xorg.libXrandr xorg.libXfixes xorg.libXcursor xorg.libXinerama
-      xlibs.libxcb fontconfig xorg.libXext xorg.libX11 alsaLib qt5.base libpulseaudio
+      xorg.libxcb fontconfig xorg.libXext xorg.libX11 alsaLib qt5.base libpulseaudio
     ];
 
   desktopItem = makeDesktopItem {
diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix
index d0cc333c71b6..f9209f28cf20 100644
--- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix
+++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg
-, bwidget, makeWrapper, x11
+, bwidget, makeWrapper, xlibsWrapper
 , withSitePlugins ? true
 , theme ? null
 }:
@@ -62,7 +62,7 @@ in mkTkabber (main // {
     done
   '';
 
-  buildInputs = [ tcl tk x11 makeWrapper ] ++ tclLibraries;
+  buildInputs = [ tcl tk xlibsWrapper makeWrapper ] ++ tclLibraries;
 
   meta = {
     homepage = "http://tkabber.jabber.ru/";
diff --git a/pkgs/applications/networking/instant-messengers/viber/default.nix b/pkgs/applications/networking/instant-messengers/viber/default.nix
index 4ebfddf82e19..8e07bbf975b2 100644
--- a/pkgs/applications/networking/instant-messengers/viber/default.nix
+++ b/pkgs/applications/networking/instant-messengers/viber/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, dpkg, makeWrapper, xlibs, qt5Full, gstreamer, zlib, sqlite, libxslt }:
+{ fetchurl, stdenv, dpkg, makeWrapper, xorg, qt5Full, gstreamer, zlib, sqlite, libxslt }:
 
 assert stdenv.system == "x86_64-linux";
 
@@ -23,15 +23,15 @@ stdenv.mkDerivation rec {
 
   libPath = stdenv.lib.makeLibraryPath [
       qt5Full
-      xlibs.libX11
+      xorg.libX11
       gstreamer
       zlib
       sqlite
-      xlibs.libXrender
+      xorg.libXrender
       libxslt
       stdenv.cc.cc
-      xlibs.libXScrnSaver
-      xlibs.libXext
+      xorg.libXScrnSaver
+      xorg.libXext
   ];
 
   installPhase = ''
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix
index 5d6e0faad4a8..96dd7bb9af04 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, which, m4, gtk, pango, perl, python, zip, libIDL
-, libjpeg, libpng, zlib, dbus, dbus_glib, bzip2, xlibs
+, libjpeg, libpng, zlib, dbus, dbus_glib, bzip2, xorg
 , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
 , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
 , hunspell, libevent, libstartup_notification, libvpx
@@ -28,11 +28,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = # from firefox30Pkgs.xulrunner, but without gstreamer and libvpx
     [ pkgconfig which libpng gtk perl zip libIDL libjpeg zlib bzip2
-      python dbus dbus_glib pango freetype fontconfig xlibs.libXi
-      xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
-      alsaLib nspr nss libnotify xlibs.pixman yasm mesa
-      xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
-      xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
+      python dbus dbus_glib pango freetype fontconfig xorg.libXi
+      xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
+      alsaLib nspr nss libnotify xorg.pixman yasm mesa
+      xorg.libXScrnSaver xorg.scrnsaverproto pysqlite
+      xorg.libXext xorg.xextproto sqlite unzip makeWrapper
       hunspell libevent libstartup_notification cairo icu
     ] ++ [ m4 ];
 
diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix
index b0c3e58cfbb6..ea6d565a10ba 100644
--- a/pkgs/applications/office/mendeley/default.nix
+++ b/pkgs/applications/office/mendeley/default.nix
@@ -1,5 +1,5 @@
 { fetchurl, stdenv, dpkg, makeWrapper, which
-,gcc, xlibs, qt4, zlib
+,gcc, xorg, qt4, zlib
 , ...}:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
@@ -24,7 +24,7 @@ let
   deps = [
     gcc.cc
     qt4
-    xlibs.libX11
+    xorg.libX11
     zlib
   ];
 
diff --git a/pkgs/applications/office/zotero/default.nix b/pkgs/applications/office/zotero/default.nix
index 9283072c0c1b..be1729b57c91 100644
--- a/pkgs/applications/office/zotero/default.nix
+++ b/pkgs/applications/office/zotero/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bash, firefox, perl, unzipNLS, xlibs }:
+{ stdenv, fetchurl, bash, firefox, perl, unzipNLS, xorg }:
 
 let
 
diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix
index 3c7f758d91bc..7573b8955b19 100644
--- a/pkgs/applications/science/math/mathematica/9.nix
+++ b/pkgs/applications/science/math/mathematica/9.nix
@@ -12,7 +12,7 @@
 , opencv
 , openssl
 , unixODBC
-, xlibs
+, xorg
 , zlib
 }:
 
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
     opencv
     openssl
     unixODBC
-  ] ++ (with xlibs; [
+  ] ++ (with xorg; [
     libX11
     libXext
     libXtst
diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix
index 39f2409a987c..233323fceef9 100644
--- a/pkgs/applications/science/math/mathematica/default.nix
+++ b/pkgs/applications/science/math/mathematica/default.nix
@@ -12,7 +12,7 @@
 , opencv
 , openssl
 , unixODBC
-, xlibs
+, xorg
 , zlib
 , libxml2
 , libuuid
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
     unixODBC
     libxml2
     libuuid
-  ] ++ (with xlibs; [
+  ] ++ (with xorg; [
     libX11
     libXext
     libXtst
diff --git a/pkgs/applications/science/math/scilab/default.nix b/pkgs/applications/science/math/scilab/default.nix
index bbb34e08c468..8482bd6fe94b 100644
--- a/pkgs/applications/science/math/scilab/default.nix
+++ b/pkgs/applications/science/math/scilab/default.nix
@@ -8,7 +8,7 @@
 , ocaml, withOCaml ? false
 #, withJava ? false
 #, atlasMath, withAtlas ? false
-, x11, withX ? false
+, xlibsWrapper, withX ? false
 }:
 
 stdenv.mkDerivation rec {
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   buildInputs = [gfortran ncurses]
   ++ lib.optionals withGtk [gtk]
   ++ lib.optionals withOCaml [ocaml]
-  ++ lib.optionals withX [x11]
+  ++ lib.optional withX xlibsWrapper
   ;
 
 
@@ -58,11 +58,7 @@ stdenv.mkDerivation rec {
   # do not compile Java interface
   + " --without-java"
   # use the X Window System
-  + (lib.optionalString withX "
-      --with-x
-      --x-libraries=${x11}/lib
-      --x-includes=${x11}/include
-    ")
+  + lib.optionalString withX "--with-x"
   ;
 
   makeFlags = "all";
diff --git a/pkgs/applications/science/misc/openmodelica/default.nix b/pkgs/applications/science/misc/openmodelica/default.nix
index 3741187067dd..5357ff09b21d 100644
--- a/pkgs/applications/science/misc/openmodelica/default.nix
+++ b/pkgs/applications/science/misc/openmodelica/default.nix
@@ -1,7 +1,7 @@
 {stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake,
 hwloc, jre, liblapack, blas, hdf5, expat, ncurses, readline, qt4, webkit, which,
 lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison,
-doxygen, boost, openscenegraph, gnome, pangox_compat, xlibs, git, bash, gtk, makeWrapper }:
+doxygen, boost, openscenegraph, gnome, pangox_compat, xorg, git, bash, gtk, makeWrapper }:
 
 let
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   buildInputs = [autoconf cmake automake libtool gfortran clang gnumake
     hwloc jre liblapack blas hdf5 expat ncurses readline qt4 webkit which
     lp_solve omniorb sqlite libatomic_ops pkgconfig file gettext flex bison
-    doxygen boost openscenegraph gnome.gtkglext pangox_compat xlibs.libXmu
+    doxygen boost openscenegraph gnome.gtkglext pangox_compat xorg.libXmu
     git gtk makeWrapper];
 
   patchPhase = ''
diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix
index 12ca1434466b..6a365dc69a51 100644
--- a/pkgs/applications/version-management/git-and-tools/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/default.nix
@@ -51,13 +51,13 @@ rec {
 
   qgit = import ./qgit {
     inherit fetchurl stdenv;
-    inherit (xlibs) libXext libX11;
+    inherit (xorg) libXext libX11;
     qt = qt4;
   };
 
   qgitGit = import ./qgit/qgit-git.nix {
     inherit fetchurl sourceFromHead stdenv;
-    inherit (xlibs) libXext libX11;
+    inherit (xorg) libXext libX11;
     qt = qt4;
   };
 
diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix
index 5a170047e8fc..f53ce93328bf 100644
--- a/pkgs/applications/video/gnash/default.nix
+++ b/pkgs/applications/video/gnash/default.nix
@@ -3,7 +3,7 @@
 , gst_ffmpeg, speex
 , libogg, libxml2, libjpeg, mesa, libpng, libungif, libtool
 , boost, freetype, agg, dbus, curl, pkgconfig, gettext
-, glib, gtk, gtkglext, pangox_compat, x11, ming, dejagnu, python, perl
+, glib, gtk, gtkglext, pangox_compat, xlibsWrapper, ming, dejagnu, python, perl
 , freefont_ttf, haxe, swftools
 , lib, makeWrapper
 , xulrunner }:
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
 
   # XXX: KDE is supported as well so we could make it available optionally.
   buildInputs = [
-    gettext x11 SDL SDL_mixer gstreamer gst_plugins_base gst_plugins_good
+    gettext xlibsWrapper SDL SDL_mixer gstreamer gst_plugins_base gst_plugins_good
     gst_ffmpeg speex libtool
     libogg libxml2 libjpeg mesa libpng libungif boost freetype agg
     dbus curl pkgconfig glib gtk gtkglext pangox_compat
diff --git a/pkgs/applications/video/mythtv/default.nix b/pkgs/applications/video/mythtv/default.nix
index cd157a473e62..4320022192a4 100644
--- a/pkgs/applications/video/mythtv/default.nix
+++ b/pkgs/applications/video/mythtv/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, which, qt4, x11, libpulseaudio, fftwSinglePrec
+{ stdenv, fetchurl, which, qt4, xlibsWrapper, libpulseaudio, fftwSinglePrec
 , lame, zlib, mesa, alsaLib, freetype, perl, pkgconfig
 , libX11, libXv, libXrandr, libXvMC, libXinerama, libXxf86vm, libXmu
 , yasm, libuuid, taglib, libtool, autoconf, automake, file
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   sourceRoot = "${name}/mythtv";
 
   buildInputs = [
-    freetype qt4 lame zlib x11 mesa perl alsaLib libpulseaudio fftwSinglePrec
+    freetype qt4 lame zlib xlibsWrapper mesa perl alsaLib libpulseaudio fftwSinglePrec
     libX11 libXv libXrandr libXvMC libXmu libXinerama libXxf86vm libXmu
     libuuid taglib
   ];
diff --git a/pkgs/applications/video/tvtime/default.nix b/pkgs/applications/video/tvtime/default.nix
index 2ec5e813c412..459ea533dba7 100644
--- a/pkgs/applications/video/tvtime/default.nix
+++ b/pkgs/applications/video/tvtime/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, xlibs, libX11, libXtst, libSM, libXext, libXv, libXxf86vm, libXau, 
+{stdenv, fetchurl, xorg, libX11, libXtst, libSM, libXext, libXv, libXxf86vm, libXau, 
    libXdmcp, zlib, libpng, libxml2, freetype, libICE, intltool, libXinerama, gettext, 
    pkgconfig, kernel, file, libXi}:
 
@@ -48,8 +48,8 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = '' 
-    --x-includes=${xlibs.libX11}/include 
-    --x-libraries=${xlibs.libX11}/lib
+    --x-includes=${xorg.libX11}/include 
+    --x-libraries=${xorg.libX11}/lib
   '';
 
   buildInputs = [ libX11 libXtst libSM libXext libXv libXxf86vm libXau libXdmcp zlib libpng libxml2 freetype libICE intltool libXinerama gettext pkgconfig file libXi ];
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index 80aa1b3c5c33..732d8cd8a0a4 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xz, bzip2, perl, xlibs, libdvdnav, libbluray
+{ stdenv, fetchurl, xz, bzip2, perl, xorg, libdvdnav, libbluray
 , zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
 , pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska
 , libvorbis, libtheora, speex, lua5, libgcrypt, libupnp
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
       libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
       udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib
       libkate libtiger libv4l samba liboggz libass libdvbpsi libva
-      xlibs.xlibs xlibs.libXv xlibs.libXvMC xlibs.libXpm xlibs.xcbutilkeysyms
+      xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
       libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate
     ]
     ++ (if withQt5 then with qt5; [ base ] else [qt4])
diff --git a/pkgs/applications/video/xine-ui/default.nix b/pkgs/applications/video/xine-ui/default.nix
index 6ae4100c8275..fd7b31de16ed 100644
--- a/pkgs/applications/video/xine-ui/default.nix
+++ b/pkgs/applications/video/xine-ui/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, xlibs, libpng, xineLib, readline, ncurses, curl
+{stdenv, fetchurl, pkgconfig, xorg, libpng, xineLib, readline, ncurses, curl
 , lirc, shared_mime_info, libjpeg }:
 
 stdenv.mkDerivation rec {
@@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ xineLib libpng readline ncurses curl lirc libjpeg
-      xlibs.xlibs xlibs.libXext xlibs.libXv xlibs.libXxf86vm xlibs.libXtst xlibs.inputproto
-      xlibs.libXinerama xlibs.libXi xlibs.libXft
+      xorg.xlibsWrapper xorg.libXext xorg.libXv xorg.libXxf86vm xorg.libXtst xorg.inputproto
+      xorg.libXinerama xorg.libXi xorg.libXft
     ];
 
   patchPhase = ''sed -e '/curl\/types\.h/d' -i src/xitk/download.c'';
diff --git a/pkgs/applications/virtualization/open-vm-tools/default.nix b/pkgs/applications/virtualization/open-vm-tools/default.nix
index cfe4ad3a8e19..e8c6b39f4933 100644
--- a/pkgs/applications/virtualization/open-vm-tools/default.nix
+++ b/pkgs/applications/virtualization/open-vm-tools/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchurl, makeWrapper, autoconf, automake,
   libmspack, openssl, pam, xercesc, icu, libdnet, procps, 
-  x11, libXinerama, libXi, libXrender, libXrandr, libXtst,
+  xlibsWrapper, libXinerama, libXi, libXrender, libXrandr, libXtst,
   pkgconfig, glib, gtk, gtkmm }:
 
 let
@@ -18,7 +18,7 @@ in stdenv.mkDerivation {
 
   buildInputs = 
     [ autoconf automake makeWrapper libmspack openssl pam xercesc icu libdnet procps
-      pkgconfig glib gtk gtkmm x11 libXinerama libXi libXrender libXrandr libXtst ];
+      pkgconfig glib gtk gtkmm xlibsWrapper libXinerama libXi libXrender libXrandr libXtst ];
 
   patchPhase = ''
      sed -i s,-Werror,,g configure.ac
diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix
index 2ff66d843cad..71c26c5f99c9 100644
--- a/pkgs/applications/virtualization/xen/generic.nix
+++ b/pkgs/applications/virtualization/xen/generic.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl
 , libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2
 , lvm2, utillinux, procps, texinfo, perl, pythonPackages
-, glib, bridge-utils, xlibs, pixman, iproute, udev, bison
+, glib, bridge-utils, xorg, pixman, iproute, udev, bison
 , flex, cmake, ocaml, ocamlPackages, figlet, libaio, yajl
 , checkpolicy, transfig, glusterfs, acl, fetchgit, xz, spice
 , spice_protocol, usbredir, alsaLib, quilt
@@ -66,7 +66,7 @@ stdenv.mkDerivation {
     [ which zlib pkgconfig SDL openssl libuuid gettext ncurses
       dev86 iasl pciutils bzip2 xz texinfo perl yajl
       pythonPackages.python pythonPackages.wrapPython
-      glib bridge-utils pixman iproute udev bison xlibs.libX11
+      glib bridge-utils pixman iproute udev bison xorg.libX11
       flex ocaml ocamlPackages.findlib figlet libaio
       checkpolicy pythonPackages.markdown transfig
       glusterfs acl cmake spice spice_protocol usbredir
diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix
index c57a89193b5e..9c9d3d5f4514 100644
--- a/pkgs/applications/window-managers/awesome/default.nix
+++ b/pkgs/applications/window-managers/awesome/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, luaPackages, cairo, cmake, imagemagick, pkgconfig, gdk_pixbuf
-, xlibs, libstartup_notification, libxdg_basedir, libpthreadstubs
+, xorg, libstartup_notification, libxdg_basedir, libpthreadstubs
 , xcb-util-cursor, makeWrapper, pango, gobjectIntrospection, unclutter
 , compton, procps, iproute, coreutils, curl, alsaUtils, findutils, xterm
 , which, dbus, nettools, git, asciidoc, doxygen
@@ -46,15 +46,15 @@ stdenv.mkDerivation rec {
     pango
     pkgconfig
     xcb-util-cursor
-    xlibs.libXau
-    xlibs.libXdmcp
-    xlibs.libxcb
-    xlibs.libxshmfence
-    xlibs.xcbutil
-    xlibs.xcbutilimage
-    xlibs.xcbutilkeysyms
-    xlibs.xcbutilrenderutil
-    xlibs.xcbutilwm
+    xorg.libXau
+    xorg.libXdmcp
+    xorg.libxcb
+    xorg.libxshmfence
+    xorg.xcbutil
+    xorg.xcbutilimage
+    xorg.xcbutilkeysyms
+    xorg.xcbutilrenderutil
+    xorg.xcbutilwm
     #xmlto docbook_xml_dtd_45 docbook_xsl
   ];
 
diff --git a/pkgs/applications/window-managers/ion-3/default.nix b/pkgs/applications/window-managers/ion-3/default.nix
index 7a467b1fcdb9..f41990730774 100644
--- a/pkgs/applications/window-managers/ion-3/default.nix
+++ b/pkgs/applications/window-managers/ion-3/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, lua, gettext, groff }:
+{ stdenv, fetchurl, xlibsWrapper, lua, gettext, groff }:
 
 stdenv.mkDerivation {
   name = "ion-3-20090110";
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
     url = http://tuomov.iki.fi/software/dl/ion-3-20090110.tar.gz;
     sha256 = "1nkks5a95986nyfkxvg2rik6zmwx0lh7szd5fji7yizccwzc9xns";
   };
-  buildInputs = [ x11 lua gettext groff ];
+  buildInputs = [ xlibsWrapper lua gettext groff ];
   buildFlags = "LUA_DIR=${lua} X11_PREFIX=/no-such-path PREFIX=\${out}";
   installFlags = "PREFIX=\${out}";
 }
diff --git a/pkgs/applications/window-managers/notion/default.nix b/pkgs/applications/window-managers/notion/default.nix
index cd43c06d33e2..2177d1a871f0 100644
--- a/pkgs/applications/window-managers/notion/default.nix
+++ b/pkgs/applications/window-managers/notion/default.nix
@@ -4,7 +4,7 @@
   stdenv, fetchurl,
   lua, gettext, groff,
   pkgconfig, busybox,
-  x11, libXinerama, libXrandr, libX11
+  xlibsWrapper, libXinerama, libXrandr, libX11
 }:
 
 assert enableXft -> libXft != null;
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
 
   patches = patches ++ stdenv.lib.optional enableXft ./notion-xft_nixos.diff;
   postPatch = "substituteInPlace system-autodetect.mk --replace '#PRELOAD_MODULES=1' 'PRELOAD_MODULES=1'";
-  buildInputs = [x11 lua gettext groff pkgconfig busybox libXinerama libXrandr libX11] ++ stdenv.lib.optional enableXft libXft;
+  buildInputs = [xlibsWrapper lua gettext groff pkgconfig busybox libXinerama libXrandr libX11] ++ stdenv.lib.optional enableXft libXft;
 
   buildFlags = "LUA_DIR=${lua} X11_PREFIX=/no-such-path PREFIX=\${out}";
   installFlags = "PREFIX=\${out}";
diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix
index 39d942362be1..236baa131c94 100644
--- a/pkgs/applications/window-managers/qtile/default.nix
+++ b/pkgs/applications/window-managers/qtile/default.nix
@@ -17,20 +17,20 @@ buildPythonPackage rec {
     substituteInPlace libqtile/manager.py --subst-var-by out $out
   '';
 
-  buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xlibs.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ];
+  buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ];
 
   cairocffi-xcffib = python27Packages.cairocffi.override {
-    LD_LIBRARY_PATH = "${pkgs.xlibs.libxcb}/lib:${pkgs.cairo}/lib";
+    LD_LIBRARY_PATH = "${pkgs.xorg.libxcb}/lib:${pkgs.cairo}/lib";
     pythonPath = [ python27Packages.xcffib ];
   };
 
   pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline ];
 
-  LD_LIBRARY_PATH = "${pkgs.xlibs.libxcb}/lib:${pkgs.cairo}/lib";
+  LD_LIBRARY_PATH = "${pkgs.xorg.libxcb}/lib:${pkgs.cairo}/lib";
 
   postInstall = ''
     wrapProgram $out/bin/qtile \
-      --prefix LD_LIBRARY_PATH : ${pkgs.xlibs.libxcb}/lib \
+      --prefix LD_LIBRARY_PATH : ${pkgs.xorg.libxcb}/lib \
       --prefix LD_LIBRARY_PATH : ${pkgs.glib}/lib \
       --prefix LD_LIBRARY_PATH : ${pkgs.cairo}/lib \
       --prefix LD_LIBRARY_PATH : ${pkgs.pango}/lib
diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix
index d270d3a2b1d6..7a662aaf09e8 100644
--- a/pkgs/applications/window-managers/weston/default.nix
+++ b/pkgs/applications/window-managers/weston/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon, cairo, libxcb
-, libXcursor, x11, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput
+, libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput
 , pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
 , libwebp ? null, xwayland ? null
 # beware of null defaults, as the parameters *are* supplied by callPackage by default
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    pkgconfig wayland mesa libxkbcommon cairo libxcb libXcursor x11 udev libdrm
+    pkgconfig wayland mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
     mtdev libjpeg pam dbus.libs libinput pango libunwind freerdp vaapi libva
     libwebp
   ];
diff --git a/pkgs/data/documentation/zeal/default.nix b/pkgs/data/documentation/zeal/default.nix
index ccfb43b14d5e..a6c77deb12ea 100644
--- a/pkgs/data/documentation/zeal/default.nix
+++ b/pkgs/data/documentation/zeal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, qt5, libarchive, xlibs }:
+{ stdenv, fetchFromGitHub, pkgconfig, qt5, libarchive, xorg }:
 
 stdenv.mkDerivation rec {
   version = "0.1.1";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    xlibs.xcbutilkeysyms pkgconfig qt5.base qt5.webkit qt5.imageformats libarchive
+    xorg.xcbutilkeysyms pkgconfig qt5.base qt5.webkit qt5.imageformats libarchive
   ];
 
   configurePhase = ''
diff --git a/pkgs/desktops/e19/efl.nix b/pkgs/desktops/e19/efl.nix
index 10b69647c0ee..16c934b3b3af 100644
--- a/pkgs/desktops/e19/efl.nix
+++ b/pkgs/desktops/e19/efl.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, openssl, libjpeg, zlib, freetype, fontconfig, fribidi, SDL2, SDL, mesa, giflib, libpng, libtiff, glib, gst_all_1, libpulseaudio, libsndfile, xlibs, libdrm, libxkbcommon, udev, utillinuxCurses, dbus, bullet, luajit, python27Packages, openjpeg, doxygen, expat, harfbuzz, jbig2dec, librsvg, dbus_libs, alsaLib, poppler, libraw, libspectre, xineLib, vlc, libwebp, curl, libinput }:
+{ stdenv, fetchurl, pkgconfig, openssl, libjpeg, zlib, freetype, fontconfig, fribidi, SDL2, SDL, mesa, giflib, libpng, libtiff, glib, gst_all_1, libpulseaudio, libsndfile, xorg, libdrm, libxkbcommon, udev, utillinuxCurses, dbus, bullet, luajit, python27Packages, openjpeg, doxygen, expat, harfbuzz, jbig2dec, librsvg, dbus_libs, alsaLib, poppler, libraw, libspectre, xineLib, vlc, libwebp, curl, libinput }:
 
 
 stdenv.mkDerivation rec {
@@ -11,13 +11,13 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig openssl zlib freetype fontconfig fribidi SDL2 SDL mesa
     giflib libpng libtiff glib gst_all_1.gstreamer gst_all_1.gst-plugins-base
-    gst_all_1.gst-libav libpulseaudio libsndfile xlibs.libXcursor xlibs.printproto
-    xlibs.libX11 udev utillinuxCurses ];
+    gst_all_1.gst-libav libpulseaudio libsndfile xorg.libXcursor xorg.printproto
+    xorg.libX11 udev utillinuxCurses ];
 
-  propagatedBuildInputs = [ libxkbcommon python27Packages.dbus dbus libjpeg xlibs.libXcomposite
-    xlibs.libXdamage xlibs.libXinerama xlibs.libXp xlibs.libXtst xlibs.libXi xlibs.libXext
-    bullet xlibs.libXScrnSaver xlibs.libXrender xlibs.libXfixes xlibs.libXrandr
-    xlibs.libxkbfile xlibs.libxcb xlibs.xcbutilkeysyms openjpeg doxygen expat luajit
+  propagatedBuildInputs = [ libxkbcommon python27Packages.dbus dbus libjpeg xorg.libXcomposite
+    xorg.libXdamage xorg.libXinerama xorg.libXp xorg.libXtst xorg.libXi xorg.libXext
+    bullet xorg.libXScrnSaver xorg.libXrender xorg.libXfixes xorg.libXrandr
+    xorg.libxkbfile xorg.libxcb xorg.xcbutilkeysyms openjpeg doxygen expat luajit
     harfbuzz jbig2dec librsvg dbus_libs alsaLib poppler libraw libspectre xineLib vlc libwebp curl libdrm
     libinput ];
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     "--disable-tslib" "--with-systemdunitdir=$out/systemd/user"
     "ac_ct_CXX=foo" ];
 
-  NIX_CFLAGS_COMPILE = [ "-I${xlibs.libXtst}" "-I${dbus_libs}/include/dbus-1.0" "-I${dbus_libs}/lib/dbus-1.0/include" ];
+  NIX_CFLAGS_COMPILE = [ "-I${xorg.libXtst}" "-I${dbus_libs}/include/dbus-1.0" "-I${dbus_libs}/lib/dbus-1.0/include" ];
 
   patches = [ ./efl-elua.patch ];
 
diff --git a/pkgs/desktops/e19/enlightenment.nix b/pkgs/desktops/e19/enlightenment.nix
index 7a350d7396b6..e4396073c03b 100644
--- a/pkgs/desktops/e19/enlightenment.nix
+++ b/pkgs/desktops/e19/enlightenment.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, e19, xlibs, libffi, pam, alsaLib, luajit, bzip2
+{ stdenv, fetchurl, pkgconfig, e19, xorg, libffi, pam, alsaLib, luajit, bzip2
 , libpthreadstubs, gdbm, libcap, mesa_glu, xkeyboard_config, set_freqset_setuid ? false }:
 
 stdenv.mkDerivation rec {
@@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
     url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
     sha256 = "1y83jnq01k9i328adgjgpfwgpvvd2a1ixpm029pjcar8p1mvgadi";
   };
-  buildInputs = [ pkgconfig e19.efl e19.elementary xlibs.libXdmcp xlibs.libxcb
-    xlibs.xcbutilkeysyms xlibs.libXrandr libffi pam alsaLib luajit bzip2
+  buildInputs = [ pkgconfig e19.efl e19.elementary xorg.libXdmcp xorg.libxcb
+    xorg.xcbutilkeysyms xorg.libXrandr libffi pam alsaLib luajit bzip2
     libpthreadstubs gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
   NIX_CFLAGS_COMPILE = [ "-I${e19.efl}/include/eo-1" "-I${e19.efl}/include/emile-1" ];
   preConfigure = ''
diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix
index 61f58719b272..5aa3d781e4b3 100644
--- a/pkgs/desktops/enlightenment/default.nix
+++ b/pkgs/desktops/enlightenment/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, x11, xlibs, dbus, imlib2, freetype }:
+{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorg, dbus, imlib2, freetype }:
 
 let version = "0.16.8.15"; in
   stdenv.mkDerivation {
@@ -10,7 +10,7 @@ let version = "0.16.8.15"; in
     };
 
     buildInputs = [pkgconfig imlib2 freetype 
-      xlibs.libX11 xlibs.libXt xlibs.libXext xlibs.libXrender xlibs.libXft ];
+      xorg.libX11 xorg.libXt xorg.libXext xorg.libXrender xorg.libXft ];
 
     meta = {
       description = "Desktop shell built on the Enlightenment Foundation Libraries";
diff --git a/pkgs/desktops/gnome-2/platform/gtkglext/default.nix b/pkgs/desktops/gnome-2/platform/gtkglext/default.nix
index b278dadfe24c..ff50bcd5e5cd 100644
--- a/pkgs/desktops/gnome-2/platform/gtkglext/default.nix
+++ b/pkgs/desktops/gnome-2/platform/gtkglext/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, glib, gtk, mesa, pango, pangox_compat, xlibs }:
+{ stdenv, fetchurl, pkgconfig, glib, gtk, mesa, pango, pangox_compat, xorg }:
 
 stdenv.mkDerivation rec {
   name = "gtkglext-1.2.0";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0lbz96jwz57hnn52b8rfj54inwpwcc9fkdq6ya043cgnfih77g8n";
   };
 
-  buildInputs = with xlibs;
+  buildInputs = with xorg;
     [ pkgconfig glib gtk mesa pango pangox_compat libX11 libXmu ];
 
   # The library uses `GTK_WIDGET_REALIZED', `GTK_WIDGET_TOPLEVEL', and
diff --git a/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix b/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix
index d230d19d5886..961fb1c0a199 100644
--- a/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix
+++ b/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libxml2, xlibs, glib, pango
+{ stdenv, fetchurl, pkgconfig, libxml2, xorg, glib, pango
 , intltool, libgnome, libgnomecanvas, libbonoboui, GConf, libtool
 , gnome_vfs, libgnome_keyring, libglade }:
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig intltool ];
   buildInputs =
-    [ xlibs.xlibs libxml2 GConf pango glib libgnome_keyring libglade libtool ];
+    [ xorg.xlibsWrapper libxml2 GConf pango glib libgnome_keyring libglade libtool ];
 
   propagatedBuildInputs = [ libgnome libbonoboui libgnomecanvas gnome_vfs ];
 }
diff --git a/pkgs/desktops/plasma-5.3/default.nix b/pkgs/desktops/plasma-5.3/default.nix
index f9026b5843a1..550491731dc8 100644
--- a/pkgs/desktops/plasma-5.3/default.nix
+++ b/pkgs/desktops/plasma-5.3/default.nix
@@ -128,7 +128,7 @@ let
               freetype glib gnugrep gnused gtk2 gtk3 libinput libssh
               modemmanager openconnect openexr pam pango qt4 samba
               socat substituteAll taglib utillinux wayland xapian
-              xkeyboard_config xlibs xorg;
+              xkeyboard_config xorg;
       boost = boost156;
       canberra = libcanberra;
       epub = ebook_tools;
@@ -157,7 +157,7 @@ let
 
         breeze-qt4 = overrideDerivation super.breeze (drv: {
           name = "breeze-qt4-${version}";
-          buildInputs = [ pkgs.xlibs.xproto pkgs.kde4.kdelibs pkgs.qt4 ];
+          buildInputs = [ pkgs.xorg.xproto pkgs.kde4.kdelibs pkgs.qt4 ];
           nativeBuildInputs = [ scope.cmake pkgs.pkgconfig ];
           cmakeFlags = [
             "-DUSE_KDE4=ON"
@@ -194,18 +194,18 @@ let
     };
 
     kwin = extendDerivation super.kwin {
-      buildInputs = with scope.xlibs; [ libICE libSM libXcursor ];
+      buildInputs = with scope.xorg; [ libICE libSM libXcursor ];
       patches = [ ./kwin/kwin-import-plugin-follow-symlinks.patch ];
     };
 
     libkscreen = extendDerivation super.libkscreen {
-      buildInputs = [ scope.xlibs.libXrandr];
+      buildInputs = [ scope.xorg.libXrandr];
     };
 
     plasma-desktop = extendDerivation super.plasma-desktop {
       buildInputs = with scope;
         [ canberra ]
-        ++ (with xlibs; [ libxkbfile libXcursor libXft ]);
+        ++ (with xorg; [ libxkbfile libXcursor libXft ]);
       patches = [
         (scope.substituteAll {
           src = ./plasma-desktop/plasma-desktop-hwclock.patch;
@@ -217,13 +217,13 @@ let
           xkb = scope.xkeyboard_config;
         })
       ];
-      NIX_CFLAGS_COMPILE = with scope.xlibs;
+      NIX_CFLAGS_COMPILE = with scope.xorg;
         lib.concatStringsSep " " [
           "-I${xf86inputsynaptics}/include/xorg"
           "-I${xf86inputevdev}/include/xorg"
           "-I${xorgserver}/include/xorg"
         ];
-      cmakeFlags = with scope.xlibs; [
+      cmakeFlags = with scope.xorg; [
         "-DEvdev_INCLUDE_DIRS=${xf86inputevdev}/include"
         "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics}/include"
       ];
@@ -231,7 +231,7 @@ let
 
     plasma-workspace = extendDerivation super.plasma-workspace {
       patches = [ ./plasma-workspace/0001-startkde-NixOS-patches.patch ];
-      buildInputs = with scope.xlibs; [ libSM libXcursor scope.pam ];
+      buildInputs = with scope.xorg; [ libSM libXcursor scope.pam ];
 
       inherit (scope) bash coreutils gnused gnugrep socat;
       inherit (scope) kconfig kinit kservice qt5tools;
@@ -246,11 +246,11 @@ let
     };
 
     powerdevil = extendDerivation super.powerdevil {
-      buildInputs = [ scope.xlibs.libXrandr ];
+      buildInputs = [ scope.xorg.libXrandr ];
     };
 
     sddm-kcm = extendDerivation super.sddm-kcm {
-      buildInputs = [ scope.xlibs.libXcursor ];
+      buildInputs = [ scope.xorg.libXcursor ];
     };
 
   };
diff --git a/pkgs/development/compilers/cudatoolkit/generic.nix b/pkgs/development/compilers/cudatoolkit/generic.nix
index d4970b278bbe..a02c917ab24a 100644
--- a/pkgs/development/compilers/cudatoolkit/generic.nix
+++ b/pkgs/development/compilers/cudatoolkit/generic.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
-, xlibs, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
+, xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
 # generic inputs
 , version, sha256, url ? null, ...
 } :
@@ -30,7 +30,7 @@ in stdenv.mkDerivation rec {
 
   runtimeDependencies = [
     ncurses expat python zlib glibc
-    xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext
+    xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
     gtk2 glib fontconfig freetype unixODBC alsaLib
   ];
 
diff --git a/pkgs/development/compilers/ocaml/3.08.0.nix b/pkgs/development/compilers/ocaml/3.08.0.nix
index f4640b36e67a..a2581f29a3f7 100644
--- a/pkgs/development/compilers/ocaml/3.08.0.nix
+++ b/pkgs/development/compilers/ocaml/3.08.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11 }:
+{ stdenv, fetchurl, xlibsWrapper }:
 
 stdenv.mkDerivation {
   name = "ocaml-3.08.0";
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
   };
   configureScript = ./configure-3.08.0;
   dontAddPrefix = "True";
-  configureFlags = ["-no-tk" "-x11lib" x11];
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
   buildFlags = ["world" "bootstrap" "opt"];
   checkTarget = ["opt.opt"];
 }
diff --git a/pkgs/development/compilers/ocaml/3.10.0.nix b/pkgs/development/compilers/ocaml/3.10.0.nix
index 69a6a1f5f676..2734bc3235d7 100644
--- a/pkgs/development/compilers/ocaml/3.10.0.nix
+++ b/pkgs/development/compilers/ocaml/3.10.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, ncurses }:
+{ stdenv, fetchurl, xlibsWrapper, ncurses }:
 
 stdenv.mkDerivation (rec {
 
@@ -10,9 +10,9 @@ stdenv.mkDerivation (rec {
   };
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk" "-x11lib" x11];
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
   buildFlags = "world bootstrap world.opt";
-  buildInputs = [x11 ncurses];
+  buildInputs = [xlibsWrapper ncurses];
   installTargets = "install installopt";
   patchPhase = ''
     CAT=$(type -tp cat)
diff --git a/pkgs/development/compilers/ocaml/3.11.2.nix b/pkgs/development/compilers/ocaml/3.11.2.nix
index ce61e5621390..c62a8151ef78 100644
--- a/pkgs/development/compilers/ocaml/3.11.2.nix
+++ b/pkgs/development/compilers/ocaml/3.11.2.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, x11 }:
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
 
 let
    useX11 = stdenv.isi686 || stdenv.isx86_64;
@@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
     ];
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
   buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
-  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
   installTargets = "install" + optionalString useNativeCompilers " installopt";
   prePatch = ''
     CAT=$(type -tp cat)
diff --git a/pkgs/development/compilers/ocaml/3.12.1.nix b/pkgs/development/compilers/ocaml/3.12.1.nix
index e6ed6f4b73ed..e9073a42cf0c 100644
--- a/pkgs/development/compilers/ocaml/3.12.1.nix
+++ b/pkgs/development/compilers/ocaml/3.12.1.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, x11 }:
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
 
 let
    useX11 = !stdenv.isArm && !stdenv.isMips;
@@ -16,9 +16,9 @@ stdenv.mkDerivation rec {
   };
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
   buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
-  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
   installTargets = "install" + optionalString useNativeCompilers " installopt";
   patches = optionals stdenv.isDarwin [ ./3.12.1-darwin-fix-configure.patch ];
   preConfigure = ''
diff --git a/pkgs/development/compilers/ocaml/4.00.1.nix b/pkgs/development/compilers/ocaml/4.00.1.nix
index f8a7ed920a52..b366f20ffb6e 100644
--- a/pkgs/development/compilers/ocaml/4.00.1.nix
+++ b/pkgs/development/compilers/ocaml/4.00.1.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, x11 }:
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
 
 let
    useX11 = !stdenv.isArm && !stdenv.isMips;
@@ -16,9 +16,9 @@ stdenv.mkDerivation rec {
   };
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
   buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
-  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
   installTargets = "install" + optionalString useNativeCompilers " installopt";
   preConfigure = ''
     CAT=$(type -tp cat)
diff --git a/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix b/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix
index 882af287c045..6c2bc8cb9ca7 100644
--- a/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix
+++ b/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, x11 }:
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
 
 let
    useX11 = stdenv.isi686 || stdenv.isx86_64;
@@ -26,9 +26,9 @@ stdenv.mkDerivation rec {
   patches = optionals stdenv.isDarwin [ ./gnused-on-osx-fix.patch ];
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
   buildFlags = "core coreboot all"; # "world" + optionalString useNativeCompilers " bootstrap world.opt";
-  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
   installFlags = "-i";
   installTargets = "install"; # + optionalString useNativeCompilers " installopt";
   prePatch = ''
diff --git a/pkgs/development/compilers/ocaml/metaocaml-3.09.nix b/pkgs/development/compilers/ocaml/metaocaml-3.09.nix
index 9b340f69e90b..6eca566dd2cd 100644
--- a/pkgs/development/compilers/ocaml/metaocaml-3.09.nix
+++ b/pkgs/development/compilers/ocaml/metaocaml-3.09.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, ncurses }:
+{ stdenv, fetchurl, xlibsWrapper, ncurses }:
 
 stdenv.mkDerivation (rec {
 
@@ -10,9 +10,9 @@ stdenv.mkDerivation (rec {
   };
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk" "-x11lib" x11];
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
   buildFlags = "world bootstrap world.opt";
-  buildInputs = [x11 ncurses];
+  buildInputs = [xlibsWrapper ncurses];
   installTargets = "install installopt";
   patchPhase = ''
     CAT=$(type -tp cat)
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index f4944e45c0e8..4e431d334cb0 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -13,7 +13,7 @@
 , requireFile
 , unzip
 , file
-, xlibs ? null
+, xorg ? null
 , installjdk ? true
 , pluginSupport ? true
 , installjce ? false
@@ -34,7 +34,7 @@
 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
-assert swingSupport -> xlibs != null;
+assert swingSupport -> xorg != null;
 
 let
 
@@ -173,8 +173,8 @@ let result = stdenv.mkDerivation rec {
    * libXt is only needed on amd64
    */
   libraries =
-    [stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
-    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.cc] else []);
+    [stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xorg.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
+    (if swingSupport then [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc] else []);
 
   passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
 
diff --git a/pkgs/development/compilers/oraclejdk/jdk6-linux.nix b/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
index 84fdf63f359a..1b33a40635a5 100644
--- a/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
@@ -3,14 +3,14 @@
 , requireFile
 , unzip
 , makeWrapper
-, xlibs ? null
+, xorg ? null
 , installjdk ? true
 , pluginSupport ? true
 , installjce ? false
 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
-assert swingSupport -> xlibs != null;
+assert swingSupport -> xorg != null;
 
 let
 
@@ -73,10 +73,10 @@ stdenv.mkDerivation {
    */
   libraries =
     [stdenv.cc.libc] ++
-    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
+    (if swingSupport then [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt] else []);
 
   inherit swingSupport pluginSupport architecture jce;
-  inherit (xlibs) libX11;
+  inherit (xorg) libX11;
 
   mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
 
diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix
index d3d65b6d64fc..eda63a426746 100644
--- a/pkgs/development/haskell-modules/default.nix
+++ b/pkgs/development/haskell-modules/default.nix
@@ -44,7 +44,7 @@ let
         overrideScope = f: callPackageWithScope (mkScope (fix (extend scope.__unfix__ f))) drv args;
       };
 
-      mkScope = scope: pkgs // pkgs.xlibs // pkgs.gnome // scope;
+      mkScope = scope: pkgs // pkgs.xorg // pkgs.gnome // scope;
       defaultScope = mkScope self;
       callPackage = drv: args: callPackageWithScope defaultScope drv args;
 
diff --git a/pkgs/development/interpreters/erlang/R15.nix b/pkgs/development/interpreters/erlang/R15.nix
index e9c8380c35ae..12f7a020032e 100644
--- a/pkgs/development/interpreters/erlang/R15.nix
+++ b/pkgs/development/interpreters/erlang/R15.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchurl, perl, gnum4, ncurses, openssl
 , makeWrapper, gnused, gawk
-, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
+, wxSupport ? false, mesa ? null, wxGTK ? null, xorg ? null }:
 
-assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
+assert wxSupport -> mesa != null && wxGTK != null && xorg != null;
 
 let version = "15B03"; in
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   buildInputs =
     [ perl gnum4 ncurses openssl
       makeWrapper
-    ] ++ stdenv.lib.optional wxSupport [ mesa wxGTK xlibs.libX11 ];
+    ] ++ stdenv.lib.optional wxSupport [ mesa wxGTK xorg.libX11 ];
 
   patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
 
diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix
index 23243803e8dc..cc15a2d21f5e 100644
--- a/pkgs/development/interpreters/erlang/R16.nix
+++ b/pkgs/development/interpreters/erlang/R16.nix
@@ -1,9 +1,9 @@
 { stdenv, fetchurl, perl, gnum4, ncurses, openssl
 , gnused, gawk, makeWrapper
 , odbcSupport ? false, unixODBC ? null
-, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
+, wxSupport ? false, mesa ? null, wxGTK ? null, xorg ? null }:
 
-assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
+assert wxSupport -> mesa != null && wxGTK != null && xorg != null;
 assert odbcSupport -> unixODBC != null;
 
 with stdenv.lib;
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ perl gnum4 ncurses openssl makeWrapper
-    ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ]
+    ] ++ optional wxSupport [ mesa wxGTK xorg.libX11 ]
       ++ optional odbcSupport [ unixODBC ];
 
   patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
diff --git a/pkgs/development/interpreters/erlang/R17.nix b/pkgs/development/interpreters/erlang/R17.nix
index 3a3d74345155..6c24f6ecb794 100644
--- a/pkgs/development/interpreters/erlang/R17.nix
+++ b/pkgs/development/interpreters/erlang/R17.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, perl, gnum4, ncurses, openssl
 , gnused, gawk, makeWrapper
 , odbcSupport ? false, unixODBC ? null
-, wxSupport ? true, mesa ? null, wxGTK ? null, xlibs ? null, wxmac ? null
+, wxSupport ? true, mesa ? null, wxGTK ? null, xorg ? null, wxmac ? null
 , javacSupport ? false, openjdk ? null
 , enableHipe ? true
 }:
 
 assert wxSupport -> (if stdenv.isDarwin
   then wxmac != null
-  else mesa != null && wxGTK != null && xlibs != null);
+  else mesa != null && wxGTK != null && xorg != null);
 
 assert odbcSupport -> unixODBC != null;
 assert javacSupport ->  openjdk != null;
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ perl gnum4 ncurses openssl makeWrapper
-    ] ++ optional wxSupport (if stdenv.isDarwin then [ wxmac ] else [ mesa wxGTK xlibs.libX11 ])
+    ] ++ optional wxSupport (if stdenv.isDarwin then [ wxmac ] else [ mesa wxGTK xorg.libX11 ])
       ++ optional odbcSupport [ unixODBC ]
       ++ optional javacSupport [ openjdk ];
 
diff --git a/pkgs/development/interpreters/erlang/R18.nix b/pkgs/development/interpreters/erlang/R18.nix
index 9bc36ee47dec..7646de28a859 100644
--- a/pkgs/development/interpreters/erlang/R18.nix
+++ b/pkgs/development/interpreters/erlang/R18.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, perl, gnum4, ncurses, openssl
 , gnused, gawk, makeWrapper
 , odbcSupport ? false, unixODBC ? null
-, wxSupport ? true, mesa ? null, wxGTK ? null, xlibs ? null, wxmac ? null
+, wxSupport ? true, mesa ? null, wxGTK ? null, xorg ? null, wxmac ? null
 , javacSupport ? false, openjdk ? null
 , enableHipe ? true
 }:
 
 assert wxSupport -> (if stdenv.isDarwin
   then wxmac != null
-  else mesa != null && wxGTK != null && xlibs != null);
+  else mesa != null && wxGTK != null && xorg != null);
 
 assert odbcSupport -> unixODBC != null;
 assert javacSupport ->  openjdk != null;
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ perl gnum4 ncurses openssl makeWrapper
-    ] ++ optional wxSupport (if stdenv.isDarwin then [ wxmac ] else [ mesa wxGTK xlibs.libX11 ])
+    ] ++ optional wxSupport (if stdenv.isDarwin then [ wxmac ] else [ mesa wxGTK xorg.libX11 ])
       ++ optional odbcSupport [ unixODBC ]
       ++ optional javacSupport [ openjdk ];
 
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index f5cf11ead970..fe209f6f1148 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi
-, sqlite, openssl, ncurses, pythonFull, expat, tcl, tk, x11, libX11
+, sqlite, openssl, ncurses, pythonFull, expat, tcl, tk, xlibsWrapper, libX11
 , makeWrapper, callPackage, self }:
 
 assert zlibSupport -> zlib != null;
@@ -21,7 +21,7 @@ let
       sha256 = "0xympj874cnjpxj68xm5gllq2f8bbvz8hr0md8mh1yd6fgzzxibh";
     };
 
-    buildInputs = [ bzip2 openssl pkgconfig pythonFull libffi ncurses expat sqlite tk tcl x11 libX11 makeWrapper ]
+    buildInputs = [ bzip2 openssl pkgconfig pythonFull libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper ]
       ++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc
       ++ stdenv.lib.optional zlibSupport zlib;
 
diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix
index 28f53f8ca95f..32974778168b 100644
--- a/pkgs/development/interpreters/python/2.6/default.nix
+++ b/pkgs/development/interpreters/python/2.6/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, includeModules ? false
-, sqlite, tcl, tk, x11, openssl, readline, db, ncurses, gdbm, self, callPackage }:
+, sqlite, tcl, tk, xlibsWrapper, openssl, readline, db, ncurses, gdbm, self, callPackage }:
 
 assert zlibSupport -> zlib != null;
 
@@ -49,7 +49,7 @@ let
 
   buildInputs =
     optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
-    [ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline x11 tcl tk sqlite ]
+    [ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline xlibsWrapper tcl tk sqlite ]
     ++ optional zlibSupport zlib;
 
 
@@ -198,7 +198,7 @@ let
 
     tkinter = buildInternalPythonModule {
       moduleName = "tkinter";
-      deps = [ tcl tk x11 ];
+      deps = [ tcl tk xlibsWrapper ];
     };
 
     readline = buildInternalPythonModule {
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix
index 195caa583ad4..6f951bc28370 100644
--- a/pkgs/development/interpreters/python/2.7/default.nix
+++ b/pkgs/development/interpreters/python/2.7/default.nix
@@ -5,7 +5,7 @@
 
 , db, gdbm, ncurses, sqlite, readline
 
-, tcl ? null, tk ? null, x11 ? null, libX11 ? null, x11Support ? !stdenv.isCygwin
+, tcl ? null, tk ? null, xlibsWrapper ? null, libX11 ? null, x11Support ? !stdenv.isCygwin
 , zlib ? null, zlibSupport ? true
 , expat, libffi
 
@@ -15,7 +15,7 @@
 assert zlibSupport -> zlib != null;
 assert x11Support -> tcl != null
                   && tk != null
-                  && x11 != null
+                  && xlibsWrapper != null
                   && libX11 != null;
 
 with stdenv.lib;
@@ -92,7 +92,7 @@ let
     ++ optionals stdenv.isCygwin [ expat libffi ]
     ++ optionals includeModules (
         [ db gdbm ncurses sqlite readline
-        ] ++ optionals x11Support [ tcl tk x11 libX11 ]
+        ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
     )
     ++ optional zlibSupport zlib
 
@@ -249,7 +249,7 @@ let
 
     tkinter = if stdenv.isCygwin then null else (buildInternalPythonModule {
       moduleName = "tkinter";
-      deps = [ tcl tk x11 libX11 ];
+      deps = [ tcl tk xlibsWrapper libX11 ];
     });
 
   } // {
diff --git a/pkgs/development/interpreters/self/default.nix b/pkgs/development/interpreters/self/default.nix
index f53e42f0bdee..d37d60993944 100644
--- a/pkgs/development/interpreters/self/default.nix
+++ b/pkgs/development/interpreters/self/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, fetchgit, stdenv, xlibs, gcc44, makeWrapper, ncurses, cmake }:
+{ fetchurl, fetchgit, stdenv, xorg, gcc44, makeWrapper, ncurses, cmake }:
 
 stdenv.mkDerivation rec {
   # The Self wrapper stores source in $XDG_DATA_HOME/self or ~/.local/share/self 
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   };
 
   # gcc 4.6 and above causes crashes on Self startup but gcc 4.4 works.
-  buildInputs = [ gcc44 ncurses xlibs.libX11 xlibs.libXext makeWrapper cmake ];
+  buildInputs = [ gcc44 ncurses xorg.libX11 xorg.libXext makeWrapper cmake ];
 
   selfWrapper = ./self;
 
diff --git a/pkgs/development/interpreters/xulrunner/default.nix b/pkgs/development/interpreters/xulrunner/default.nix
index 1f24b4dde548..bc943a80ac7b 100644
--- a/pkgs/development/interpreters/xulrunner/default.nix
+++ b/pkgs/development/interpreters/xulrunner/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
-, libjpeg, zlib, dbus, dbus_glib, bzip2, xlibs
+, libjpeg, zlib, dbus, dbus_glib, bzip2, xorg
 , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
 , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
 , hunspell, libevent, libstartup_notification, libvpx
@@ -18,11 +18,11 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ pkgconfig gtk perl zip libIDL libjpeg zlib bzip2
-      python dbus dbus_glib pango freetype fontconfig xlibs.libXi
-      xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
-      alsaLib nspr nss libnotify xlibs.pixman yasm mesa
-      xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
-      xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
+      python dbus dbus_glib pango freetype fontconfig xorg.libXi
+      xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
+      alsaLib nspr nss libnotify xorg.pixman yasm mesa
+      xorg.libXScrnSaver xorg.scrnsaverproto pysqlite
+      xorg.libXext xorg.xextproto sqlite unzip makeWrapper
       hunspell libevent libstartup_notification libvpx cairo
       gstreamer gst_plugins_base icu
     ];
diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix
index 1fae5d42ab7e..ac895b5113ed 100644
--- a/pkgs/development/libraries/SDL/default.nix
+++ b/pkgs/development/libraries/SDL/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, audiofile, libcap
 , openglSupport ? false, mesa ? null
 , alsaSupport ? true, alsaLib ? null
-, x11Support ? true, x11 ? null, libXrandr ? null
+, x11Support ? true, xlibsWrapper ? null, libXrandr ? null
 , pulseaudioSupport ? true, libpulseaudio ? null
 }:
 
@@ -10,7 +10,7 @@
 assert (stdenv.isLinux && !(stdenv ? cross)) -> alsaSupport || pulseaudioSupport;
 
 assert openglSupport -> (mesa != null && x11Support);
-assert x11Support -> (x11 != null && libXrandr != null);
+assert x11Support -> (xlibsWrapper != null && libXrandr != null);
 assert alsaSupport -> alsaLib != null;
 assert pulseaudioSupport -> libpulseaudio != null;
 
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
 
   # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
   propagatedBuildInputs =
-    optionals x11Support [ x11 libXrandr ] ++
+    optionals x11Support [ xlibsWrapper libXrandr ] ++
     optional alsaSupport alsaLib ++
     optional stdenv.isLinux libcap ++
     optional openglSupport mesa ++
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index f5bd144a7172..7573d1e1cd29 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, audiofile
 , openglSupport ? false, mesa ? null
 , alsaSupport ? true, alsaLib ? null
-, x11Support ? true, x11 ? null, libXrandr ? null
+, x11Support ? true, xlibsWrapper ? null, libXrandr ? null
 , pulseaudioSupport ? true, libpulseaudio ? null
 }:
 
@@ -10,7 +10,7 @@
 assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
 
 assert openglSupport -> (stdenv.isDarwin || mesa != null && x11Support);
-assert x11Support -> (x11 != null && libXrandr != null);
+assert x11Support -> (xlibsWrapper != null && libXrandr != null);
 assert alsaSupport -> alsaLib != null;
 assert pulseaudioSupport -> libpulseaudio != null;
 
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
   };
 
   # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
-  propagatedBuildInputs = stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
+  propagatedBuildInputs = stdenv.lib.optionals x11Support [ xlibsWrapper libXrandr ] ++
     stdenv.lib.optional pulseaudioSupport libpulseaudio;
 
   buildInputs = [ pkgconfig audiofile ] ++
diff --git a/pkgs/development/libraries/Xaw3d/default.nix b/pkgs/development/libraries/Xaw3d/default.nix
index 454c4e882f56..6084e7074fe4 100644
--- a/pkgs/development/libraries/Xaw3d/default.nix
+++ b/pkgs/development/libraries/Xaw3d/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11, imake, gccmakedep, libXmu, libXpm, libXp, bison, flex}:
+{stdenv, fetchurl, xlibsWrapper, imake, gccmakedep, libXmu, libXpm, libXp, bison, flex}:
 
 stdenv.mkDerivation {
   name = "Xaw3d-1.5E";
@@ -8,8 +8,8 @@ stdenv.mkDerivation {
     md5 = "29ecfdcd6bcf47f62ecfd672d31269a1";
   };
   patches = [./config.patch ./laylex.patch];
-  buildInputs = [x11 imake gccmakedep libXmu libXpm libXp bison flex];
-  propagatedBuildInputs = [x11 libXmu];
+  buildInputs = [imake gccmakedep libXpm libXp bison flex];
+  propagatedBuildInputs = [xlibsWrapper libXmu];
 
   meta = {
     description = "3D widget set based on the Athena Widget set";
diff --git a/pkgs/development/libraries/at-spi2-atk/default.nix b/pkgs/development/libraries/at-spi2-atk/default.nix
index 940fc2bb6cc6..7e6286abcce3 100644
--- a/pkgs/development/libraries/at-spi2-atk/default.nix
+++ b/pkgs/development/libraries/at-spi2-atk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python, pkgconfig, popt, atk, libX11, libICE, xlibs, libXi
+{ stdenv, fetchurl, python, pkgconfig, popt, atk, libX11, libICE, xorg, libXi
 , intltool, dbus_glib, at_spi2_core, libSM }:
 
 stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "1y9gfz1iz3wpja7s000f0bmyyvc6im5fcdl6bxwbz0v3qdgc9vvq";
   };
 
-  buildInputs = [ python pkgconfig popt atk libX11 libICE xlibs.libXtst libXi
+  buildInputs = [ python pkgconfig popt atk libX11 libICE xorg.libXtst libXi
                   intltool dbus_glib at_spi2_core libSM ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index 47a2c63d3283..e2d6b25e137d 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
-, expat, zlib, libpng, pixman, fontconfig, freetype, xlibs
+, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
 , gobjectSupport ? true, glib
 , xcbSupport ? true # no longer experimental since 1.12
 , glSupport ? true, mesa_noglu ? null # mesa is no longer a big dependency
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
 
   propagatedBuildInputs =
-    with xlibs; [ xlibs.xlibs fontconfig expat freetype pixman zlib libpng ]
+    with xorg; [ xorg.xlibsWrapper fontconfig expat freetype pixman zlib libpng ]
     ++ optional (!stdenv.isDarwin) libXrender
     ++ optionals xcbSupport [ libxcb xcbutil ]
     ++ optional gobjectSupport glib
diff --git a/pkgs/development/libraries/cairomm/default.nix b/pkgs/development/libraries/cairomm/default.nix
index b8e9fd7966b0..97636f7a9574 100644
--- a/pkgs/development/libraries/cairomm/default.nix
+++ b/pkgs/development/libraries/cairomm/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, pkgconfig, cairo, x11, fontconfig, freetype, libsigcxx }:
+{ fetchurl, stdenv, pkgconfig, cairo, xlibsWrapper, fontconfig, freetype, libsigcxx }:
 
 stdenv.mkDerivation rec {
   name = "cairomm-1.11.2";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig ];
 
-  propagatedBuildInputs = [ cairo x11 fontconfig freetype libsigcxx ];
+  propagatedBuildInputs = [ cairo xlibsWrapper fontconfig freetype libsigcxx ];
 
   meta = with stdenv.lib; {
     description = "A 2D graphics library with support for multiple output devices";
diff --git a/pkgs/development/libraries/directfb/default.nix b/pkgs/development/libraries/directfb/default.nix
index 81c23f7e41ce..b4dd865dec01 100644
--- a/pkgs/development/libraries/directfb/default.nix
+++ b/pkgs/development/libraries/directfb/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, perl, zlib, libjpeg, freetype, libpng, giflib
-, enableX11 ? true, xlibs
+, enableX11 ? true, xorg
 , enableSDL ? true, SDL }:
 
 let s = 
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ pkgconfig zlib libjpeg freetype giflib libpng ]
     ++ stdenv.lib.optional enableSDL SDL
-    ++ stdenv.lib.optionals enableX11 (with xlibs; [
+    ++ stdenv.lib.optionals enableX11 (with xorg; [
       xproto libX11 libXext #xextproto
       #renderproto libXrender
     ]);
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
index 0d262fb061e2..8a24445dcca7 100644
--- a/pkgs/development/libraries/dlib/default.nix
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, x11 }:
+{ stdenv, fetchurl, cmake, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
   version = "18.10";
@@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
   '';   
 
   enableParallelBuilding = true;
-  buildInputs = [ cmake x11 ];
-  propagatedBuildInputs = [ x11 ];
+  buildInputs = [ cmake xlibsWrapper ];
+  propagatedBuildInputs = [ xlibsWrapper ];
 
   meta = with stdenv.lib; {
     description = "A general purpose cross-platform C++ machine learning library";
diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix
index d51419f37540..6398e5542ac3 100644
--- a/pkgs/development/libraries/fltk/default.nix
+++ b/pkgs/development/libraries/fltk/default.nix
@@ -1,4 +1,4 @@
-{ composableDerivation, fetchurl, pkgconfig, x11, inputproto, libXi
+{ composableDerivation, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
 , freeglut, mesa, libjpeg, zlib, libXinerama, libXft, libpng }:
 
 let inherit (composableDerivation) edf; in
@@ -11,7 +11,7 @@ composableDerivation.composableDerivation {} rec {
     sha256 = "0353ngb7gpyklc9mdz8629big2na3c73akfwhis8fhqp7jkbs9ih";
   };
 
-  propagatedBuildInputs = [ x11 inputproto libXi freeglut ];
+  propagatedBuildInputs = [ xlibsWrapper inputproto libXi freeglut ];
 
   buildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/fltk/fltk13.nix b/pkgs/development/libraries/fltk/fltk13.nix
index a5b65f09e613..cb71724a3604 100644
--- a/pkgs/development/libraries/fltk/fltk13.nix
+++ b/pkgs/development/libraries/fltk/fltk13.nix
@@ -1,4 +1,4 @@
-{ composableDerivation, fetchurl, pkgconfig, x11, inputproto, libXi
+{ composableDerivation, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
 , freeglut, mesa, libjpeg, zlib, libXinerama, libXft, libpng
 , cfg ? {}
 , automake, autoconf, libtool
@@ -21,7 +21,7 @@ composableDerivation.composableDerivation {} {
       --replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand'
   '';
 
-  propagatedBuildInputs = [ x11 inputproto libXi freeglut ];
+  propagatedBuildInputs = [ xlibsWrapper inputproto libXi freeglut ];
 
   enableParallelBilding = true;
 
diff --git a/pkgs/development/libraries/fox/default.nix b/pkgs/development/libraries/fox/default.nix
index dfd2c75184ee..2d44444ab40d 100644
--- a/pkgs/development/libraries/fox/default.nix
+++ b/pkgs/development/libraries/fox/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor, libXrandr, libXft }:
+{ stdenv, fetchurl, xlibsWrapper, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor, libXrandr, libXft }:
 
 let
   version = "1.7.9";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "1jb9368xsin3ppdf6979n5s7in3s9klbxqbwcp0z8misjixl7nzg";
   };
 
-  buildInputs = [ libpng x11 libjpeg libtiff zlib bzip2 libXcursor libXrandr libXft ];
+  buildInputs = [ libpng xlibsWrapper libjpeg libtiff zlib bzip2 libXcursor libXrandr libXft ];
 
   doCheck = true;
 
diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix
index e966388b2ad9..3c823adf91b6 100644
--- a/pkgs/development/libraries/fox/fox-1.6.nix
+++ b/pkgs/development/libraries/fox/fox-1.6.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor
+{ stdenv, fetchurl, xlibsWrapper, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor
 , libXrandr, mesa, libXft, libXfixes, xinput }:
 
 let
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "03m9wm8hpzh1i0fxx5mpvjr67384pfm9hn7gzdcq55b4639fqy9n";
   };
 
-  buildInputs = [ x11 libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr
+  buildInputs = [ xlibsWrapper libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr
       libXft mesa libXfixes xinput ];
 
   doCheck = true;
diff --git a/pkgs/development/libraries/frame/default.nix b/pkgs/development/libraries/frame/default.nix
index 86ebaa0d8d91..fa8e9f0ef2c9 100644
--- a/pkgs/development/libraries/frame/default.nix
+++ b/pkgs/development/libraries/frame/default.nix
@@ -1,5 +1,5 @@
 { enableX11 ? true
-,  stdenv, fetchurl, pkgconfig, xlibs, xorgserver, xinput }:
+,  stdenv, fetchurl, pkgconfig, xorg, xorgserver, xinput }:
 
 stdenv.mkDerivation rec {
   name = "frame-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ 
     stdenv pkgconfig
-  ] ++ stdenv.lib.optional enableX11 [xlibs.xorgserver xlibs.libX11 xlibs.libXext xlibs.libXi];
+  ] ++ stdenv.lib.optional enableX11 [xorg.xorgserver xorg.libX11 xorg.libXext xorg.libXi];
 
   configureFlags = stdenv.lib.optional enableX11 "--with-x11";
 
diff --git a/pkgs/development/libraries/freeglut/default.nix b/pkgs/development/libraries/freeglut/default.nix
index 6159ce7c9e0a..368a1e274878 100644
--- a/pkgs/development/libraries/freeglut/default.nix
+++ b/pkgs/development/libraries/freeglut/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libXi, libXrandr, libXxf86vm, mesa, x11, cmake }:
+{ stdenv, fetchurl, libXi, libXrandr, libXxf86vm, mesa, xlibsWrapper, cmake }:
 
 let version = "3.0.0";
 in stdenv.mkDerivation {
@@ -9,7 +9,7 @@ in stdenv.mkDerivation {
     sha256 = "18knkyczzwbmyg8hr4zh8a1i5ga01np2jzd1rwmsh7mh2n2vwhra";
   };
 
-  buildInputs = [ libXi libXrandr libXxf86vm mesa x11 cmake ];
+  buildInputs = [ libXi libXrandr libXxf86vm mesa xlibsWrapper cmake ];
 
   meta = with stdenv.lib; {
     description = "Create and manage windows containing OpenGL contexts";
diff --git a/pkgs/development/libraries/geis/default.nix b/pkgs/development/libraries/geis/default.nix
index 24c24fe5f123..5ef53ec79391 100644
--- a/pkgs/development/libraries/geis/default.nix
+++ b/pkgs/development/libraries/geis/default.nix
@@ -1,5 +1,5 @@
 { enableX11 ? true
-, stdenv, fetchurl, pkgconfig, xlibs, xorgserver, python3, dbus_libs, frame, grail }:
+, stdenv, fetchurl, pkgconfig, xorg, xorgserver, python3, dbus_libs, frame, grail }:
 
 stdenv.mkDerivation rec {
   name = "geis-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ pkgconfig python3 dbus_libs frame grail ]
-  ++ stdenv.lib.optional enableX11 [xlibs.libX11 xlibs.libXtst xlibs.libXext xlibs.libXi xlibs.xorgserver];
+  ++ stdenv.lib.optional enableX11 [xorg.libX11 xorg.libXtst xorg.libXext xorg.libXi xorg.xorgserver];
 
   configureFlags = stdenv.lib.optional enableX11"--enable-x11";
 
diff --git a/pkgs/development/libraries/giblib/default.nix b/pkgs/development/libraries/giblib/default.nix
index 3ae649b67902..b6e515fef803 100644
--- a/pkgs/development/libraries/giblib/default.nix
+++ b/pkgs/development/libraries/giblib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, imlib2 }:
+{ stdenv, fetchurl, xlibsWrapper, imlib2 }:
 
 stdenv.mkDerivation rec {
   name = "giblib-1.2.4";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp";
   };
   
-  buildInputs = [x11 imlib2];
+  buildInputs = [xlibsWrapper imlib2];
 
   meta = {
     homepage = http://linuxbrit.co.uk/giblib/;
diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix
index 5127311e7c91..cbdc28311877 100644
--- a/pkgs/development/libraries/glew/default.nix
+++ b/pkgs/development/libraries/glew/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
+{ stdenv, fetchurl, mesa_glu, xlibsWrapper, libXmu, libXi }:
 
 with stdenv.lib;
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1mhkllxz49l1x680dmzrv2i82qjrq017sykah3xc90f2d8qcxfv9";
   };
 
-  nativeBuildInputs = [ x11 libXmu libXi ];
+  nativeBuildInputs = [ xlibsWrapper libXmu libXi ];
   propagatedNativeBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
 
   patchPhase = ''
diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix
index 087be3bb6de0..02d26759834c 100644
--- a/pkgs/development/libraries/glfw/3.x.nix
+++ b/pkgs/development/libraries/glfw/3.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, mesa, libXrandr, libXi, libXxf86vm, libXfixes, x11
+{ stdenv, fetchurl, cmake, mesa, libXrandr, libXi, libXxf86vm, libXfixes, xlibsWrapper
 , libXinerama, libXcursor
 }:
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   buildInputs = [
-    cmake mesa libXrandr libXi libXxf86vm libXfixes x11
+    cmake mesa libXrandr libXi libXxf86vm libXfixes xlibsWrapper
     libXinerama libXcursor
   ];
 
diff --git a/pkgs/development/libraries/grail/default.nix b/pkgs/development/libraries/grail/default.nix
index 3cf946bb4ba5..a4f27824d136 100644
--- a/pkgs/development/libraries/grail/default.nix
+++ b/pkgs/development/libraries/grail/default.nix
@@ -1,5 +1,5 @@
 { enableX11 ? true,
-  stdenv, fetchurl, pkgconfig, xlibs, python3, frame }:
+  stdenv, fetchurl, pkgconfig, xorg, python3, frame }:
 
 stdenv.mkDerivation rec {
   name = "grail-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ pkgconfig python3 frame ]
-  ++ stdenv.lib.optional enableX11 [xlibs.libX11 xlibs.libXtst xlibs.libXext xlibs.libXi xlibs.libXfixes];
+  ++ stdenv.lib.optional enableX11 [xorg.libX11 xorg.libXtst xorg.libXext xorg.libXi xorg.libXfixes];
 
   configureFlags = stdenv.lib.optional enableX11 "--with-x11";
 
diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix
index 040cf20c4ea4..eb55ae874e5a 100644
--- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix
+++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, pkgconfig, python, gstreamer, xlibs, alsaLib, cdparanoia
+{ fetchurl, stdenv, pkgconfig, python, gstreamer, xorg, alsaLib, cdparanoia
 , libogg, libtheora, libvorbis, freetype, pango, liboil, glib, cairo, orc
 , libintlOrEmpty
 , # Whether to build no plugins that have external dependencies
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     # can't build alsaLib on darwin
     ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib
     ++ stdenv.lib.optionals (!minimalDeps)
-      [ xlibs.xlibs xlibs.libXv libogg libtheora libvorbis freetype pango
+      [ xorg.xlibsWrapper xorg.libXv libogg libtheora libvorbis freetype pango
         liboil ]
     # can't build cdparanoia on darwin
     ++ stdenv.lib.optional (!minimalDeps && !stdenv.isDarwin) cdparanoia
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index fec9d16cf959..e821e693b0ce 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xlibs
-, gdk_pixbuf, libintlOrEmpty, x11
+{ stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg
+, gdk_pixbuf, libintlOrEmpty, xlibsWrapper
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? true, cups ? null
 }:
 
-assert xineramaSupport -> xlibs.libXinerama != null;
+assert xineramaSupport -> xorg.libXinerama != null;
 assert cupsSupport -> cups != null;
 
 stdenv.mkDerivation rec {
@@ -21,12 +21,12 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ perl pkgconfig gettext ];
 
-  propagatedBuildInputs = with xlibs; with stdenv.lib;
+  propagatedBuildInputs = with xorg; with stdenv.lib;
     [ glib cairo pango gdk_pixbuf atk ]
     ++ optionals (stdenv.isLinux || stdenv.isDarwin) [
          libXrandr libXrender libXcomposite libXi libXcursor
        ]
-    ++ optionals stdenv.isDarwin [ x11 libXdamage ]
+    ++ optionals stdenv.isDarwin [ xlibsWrapper libXdamage ]
     ++ libintlOrEmpty
     ++ optional xineramaSupport libXinerama
     ++ optionals cupsSupport [ cups ];
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index 5fb70ac05ea9..1929dd01c6b8 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, gettext, perl
 , expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection
-, xlibs, x11, wayland, libxkbcommon, epoxy
+, xorg, xlibsWrapper, wayland, libxkbcommon, epoxy
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? stdenv.isLinux, cups ? null
 }:
 
-assert xineramaSupport -> xlibs.libXinerama != null;
+assert xineramaSupport -> xorg.libXinerama != null;
 assert cupsSupport -> cups != null;
 
 let
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
 
   buildInputs = [ libxkbcommon epoxy ];
-  propagatedBuildInputs = with xlibs; with stdenv.lib;
+  propagatedBuildInputs = with xorg; with stdenv.lib;
     [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk libXrandr libXrender libXcomposite libXi libXcursor ]
     ++ optionals stdenv.isLinux [ wayland ]
     ++ optional xineramaSupport libXinerama
diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix
index 50703f907d34..3ff608a4ac33 100644
--- a/pkgs/development/libraries/imlib2/default.nix
+++ b/pkgs/development/libraries/imlib2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }:
+{ stdenv, fetchurl, xlibsWrapper, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }:
 
 stdenv.mkDerivation rec {
   name = "imlib2-1.4.6";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0x1j0ylpclkp8cfpwfpkjywqz124bqskyxbw8pvwzkv2gmrbwldg";
   };
 
-  buildInputs = [ x11 libjpeg libtiff giflib libpng bzip2 ];
+  buildInputs = [ xlibsWrapper libjpeg libtiff giflib libpng bzip2 ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/jasper/default.nix b/pkgs/development/libraries/jasper/default.nix
index 7b86403b0aaf..2fa9cf7dbf95 100644
--- a/pkgs/development/libraries/jasper/default.nix
+++ b/pkgs/development/libraries/jasper/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, xlibs, libjpeg }:
+{ stdenv, fetchurl, unzip, xorg, libjpeg }:
 
 stdenv.mkDerivation rec {
   name = "jasper-1.900.1";
diff --git a/pkgs/development/libraries/kde-frameworks-5.10/default.nix b/pkgs/development/libraries/kde-frameworks-5.10/default.nix
index d5bb3f78ce85..8196aeab6c2b 100644
--- a/pkgs/development/libraries/kde-frameworks-5.10/default.nix
+++ b/pkgs/development/libraries/kde-frameworks-5.10/default.nix
@@ -116,7 +116,7 @@ let
       {
         inherit acl cmake docbook_xml_dtd_45 docbook5_xsl epoxy fam gpgme
                 libgcrypt libgit2 modemmanager networkmanager perl
-                perlPackages qimageblitz xlibs zlib;
+                perlPackages qimageblitz xorg zlib;
         boost = boost156;
         gif = giflib;
         glib2 = glib;
@@ -147,7 +147,7 @@ let
     });
 
     frameworkintegration = extendDerivation super.frameworkintegration {
-      buildInputs = [ scope.xlibs.libXcursor ];
+      buildInputs = [ scope.xorg.libXcursor ];
     };
 
     kauth = extendDerivation super.kauth {
@@ -164,7 +164,7 @@ let
     };
 
     kdelibs4support = extendDerivation super.kdelibs4support {
-      buildInputs = [ scope.networkmanager scope.xlibs.libSM ];
+      buildInputs = [ scope.networkmanager scope.xorg.libSM ];
       cmakeFlags = [
         "-DDocBookXML4_DTD_DIR=${pkgs.docbook_xml_dtd_45}/xml/dtd/docbook"
         "-DDocBookXML4_DTD_VERSION=4.5"
diff --git a/pkgs/development/libraries/kde-frameworks-5.12/default.nix b/pkgs/development/libraries/kde-frameworks-5.12/default.nix
index d8f51fe7eb78..1b42bab42639 100644
--- a/pkgs/development/libraries/kde-frameworks-5.12/default.nix
+++ b/pkgs/development/libraries/kde-frameworks-5.12/default.nix
@@ -116,7 +116,7 @@ let
       {
         inherit acl cmake docbook_xml_dtd_45 docbook5_xsl epoxy fam gpgme
                 libgcrypt libgit2 modemmanager networkmanager perl
-                perlPackages qimageblitz xlibs zlib;
+                perlPackages qimageblitz xorg zlib;
         boost = boost156;
         gif = giflib;
         glib2 = glib;
@@ -154,7 +154,7 @@ let
     });
 
     frameworkintegration = extendDerivation super.frameworkintegration {
-      buildInputs = [ scope.xlibs.libXcursor ];
+      buildInputs = [ scope.xorg.libXcursor ];
     };
 
     kauth = extendDerivation super.kauth {
@@ -171,7 +171,7 @@ let
     };
 
     kdelibs4support = extendDerivation super.kdelibs4support {
-      buildInputs = [ scope.networkmanager scope.xlibs.libSM ];
+      buildInputs = [ scope.networkmanager scope.xorg.libSM ];
       cmakeFlags = [
         "-DDocBookXML4_DTD_DIR=${pkgs.docbook_xml_dtd_45}/xml/dtd/docbook"
         "-DDocBookXML4_DTD_VERSION=4.5"
diff --git a/pkgs/development/libraries/libclxclient/default.nix b/pkgs/development/libraries/libclxclient/default.nix
index 4dc103515ac7..4dca6b57c75a 100644
--- a/pkgs/development/libraries/libclxclient/default.nix
+++ b/pkgs/development/libraries/libclxclient/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libclthreads, libX11, libXft, xlibs }:
+{ stdenv, fetchurl, libclthreads, libX11, libXft, xorg }:
 
 stdenv.mkDerivation rec {
   name = "libclxclient-${version}";
@@ -9,9 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "14l7xrh964gllymraq4n5pgax94p5jsfjslqi5c6637zc4lmgnl0";
   };
 
-  buildInputs = [ libclthreads libX11 libXft xlibs.xproto ];
+  buildInputs = [ libclthreads libX11 libXft xorg.xproto ];
 
-  NIX_CFLAGS_COMPILE = "-I${xlibs.xproto}/include -I${libXft}/include";
+  NIX_CFLAGS_COMPILE = "-I${xorg.xproto}/include -I${libXft}/include";
 
   patchPhase = ''
     sed -e "s@ldconfig@@" -i Makefile
diff --git a/pkgs/development/libraries/libcm/default.nix b/pkgs/development/libraries/libcm/default.nix
index 09ef21dff597..1d4e96d55b6d 100644
--- a/pkgs/development/libraries/libcm/default.nix
+++ b/pkgs/development/libraries/libcm/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, glib, xlibs, mesa}:
+{stdenv, fetchurl, pkgconfig, glib, xorg, mesa}:
 
 stdenv.mkDerivation {
   name = "libcm-0.1.1";
@@ -7,8 +7,8 @@ stdenv.mkDerivation {
     sha256 = "11i5z8l5v5ffihif35k5j8igj0rahsk4jdmsj24xhdw2s0zx53kn";
   };
   buildInputs = [
-    pkgconfig glib xlibs.xlibs xlibs.libXdamage xlibs.libXcomposite
-    xlibs.libXtst xlibs.inputproto
+    pkgconfig glib xorg.xlibsWrapper xorg.libXdamage xorg.libXcomposite
+    xorg.libXtst xorg.inputproto
     # !!! inputproto should really be propagated by libXtst
   ];
   propagatedBuildInputs = [mesa];
diff --git a/pkgs/development/libraries/lirc/default.nix b/pkgs/development/libraries/lirc/default.nix
index 4513530e6f09..a2e5d153060b 100644
--- a/pkgs/development/libraries/lirc/default.nix
+++ b/pkgs/development/libraries/lirc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, alsaLib, bash, help2man, pkgconfig, x11, python3, libxslt }:
+{ stdenv, fetchurl, alsaLib, bash, help2man, pkgconfig, xlibsWrapper, python3, libxslt }:
 
 stdenv.mkDerivation rec {
   name = "lirc-0.9.3";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   preBuild = "patchShebangs .";
 
-  buildInputs = [ alsaLib help2man pkgconfig x11 python3 libxslt ];
+  buildInputs = [ alsaLib help2man pkgconfig xlibsWrapper python3 libxslt ];
 
   configureFlags = [
     "--with-driver=devinput"
diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix
index 87187667a922..2db67041ec34 100644
--- a/pkgs/development/libraries/pango/default.nix
+++ b/pkgs/development/libraries/pango/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, x11, glib, cairo, libpng, harfbuzz
+{ stdenv, fetchurl, pkgconfig, xlibsWrapper, glib, cairo, libpng, harfbuzz
 , fontconfig, freetype, libintlOrEmpty, gobjectIntrospection
 }:
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     ++ optionals stdenv.isDarwin [ fontconfig ];
   nativeBuildInputs = [ pkgconfig ];
 
-  propagatedBuildInputs = [ x11 glib cairo libpng fontconfig freetype harfbuzz ] ++ libintlOrEmpty;
+  propagatedBuildInputs = [ xlibsWrapper glib cairo libpng fontconfig freetype harfbuzz ] ++ libintlOrEmpty;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix
index 872576d9fb02..2c07c1e08580 100644
--- a/pkgs/development/libraries/physics/geant4/default.nix
+++ b/pkgs/development/libraries/physics/geant4/default.nix
@@ -26,7 +26,7 @@
 
 # For enableQT, enableXM, enableOpenGLX11, enableRaytracerX11.
 , mesa   ? null
-, x11    ? null
+, xlibsWrapper    ? null
 , libXmu ? null
 }:
 
@@ -41,7 +41,7 @@ assert enableXM -> motif != null;
 
 # OpenGL/X11 User Interface and Visualisation drivers.
 assert enableQT || enableXM || enableOpenGLX11 || enableRaytracerX11 -> mesa   != null;
-assert enableQT || enableXM || enableOpenGLX11 || enableRaytracerX11 -> x11    != null;
+assert enableQT || enableXM || enableOpenGLX11 || enableRaytracerX11 -> xlibsWrapper    != null;
 assert enableQT || enableXM || enableOpenGLX11 || enableRaytracerX11 -> libXmu != null;
 
 let
@@ -81,8 +81,8 @@ let
       };
 
       enableParallelBuilding = true;
-      buildInputs = [ cmake clhep expat zlib xercesc qt motif mesa x11 libXmu ];
-      propagatedBuildInputs = [ g4data clhep expat zlib xercesc qt motif mesa x11 libXmu ];
+      buildInputs = [ cmake clhep expat zlib xercesc qt motif mesa xlibsWrapper libXmu ];
+      propagatedBuildInputs = [ g4data clhep expat zlib xercesc qt motif mesa xlibsWrapper libXmu ];
 
       setupHook = ./setup-hook.sh;
 
diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix
index ffad44188154..08d8f141deb0 100644
--- a/pkgs/development/libraries/qt-3/default.nix
+++ b/pkgs/development/libraries/qt-3/default.nix
@@ -7,7 +7,7 @@
 , threadSupport ? true
 , mysqlSupport ? false, mysql ? null
 , openglSupport ? false, mesa ? null, libXmu ? null
-, x11, xextproto, zlib, libjpeg, libpng, which
+, xlibsWrapper, xextproto, zlib, libjpeg, libpng, which
 }:
 
 assert xftSupport -> libXft != null;
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ which ];
-  propagatedBuildInputs = [libpng x11 libXft libXrender zlib libjpeg];
+  propagatedBuildInputs = [libpng xlibsWrapper libXft libXrender zlib libjpeg];
 
   configureFlags = "
     -v
diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
index 2e4a1c1c161a..30d53eb874be 100644
--- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
@@ -1,7 +1,7 @@
 { stdenv, substituteAll
 , srcs, version
 
-, xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi
+, xorg, libX11, libxcb, libXcursor, libXext, libXrender, libXi
 , xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilwm, libxkbcommon
 , fontconfig, freetype, openssl, dbus, glib, udev, libxml2, libxslt, pcre
 , zlib, libjpeg, libpng, libtiff, sqlite, icu
@@ -163,7 +163,7 @@ stdenv.mkDerivation {
   PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
 
   propagatedBuildInputs = [
-    xlibs.libXcomposite libX11 libxcb libXext libXrender libXi
+    xorg.libXcomposite libX11 libxcb libXext libXrender libXi
     fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre
     zlib libjpeg libpng libtiff sqlite icu
     xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon
diff --git a/pkgs/development/libraries/snack/default.nix b/pkgs/development/libraries/snack/default.nix
index d7a0b11a8dab..ef2db5ae5a6a 100644
--- a/pkgs/development/libraries/snack/default.nix
+++ b/pkgs/development/libraries/snack/default.nix
@@ -1,6 +1,6 @@
 # alsaLib vorbisTools python can be made optional
 
-{ stdenv, fetchurl, python, tcl, tk, vorbisTools, pkgconfig, x11 }:
+{ stdenv, fetchurl, python, tcl, tk, vorbisTools, pkgconfig, xlibsWrapper }:
 
 stdenv.mkDerivation {
   name = "snack-2.2.10";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
 
   postUnpack = ''sourceRoot="$sourceRoot/unix"'';
 
-  buildInputs = [ python tcl tk vorbisTools pkgconfig x11 ];
+  buildInputs = [ python tcl tk vorbisTools pkgconfig xlibsWrapper ];
 
   postInstall = "aoeu";
 
diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix
index bde3f6e4efb9..0ed4f24ef86b 100644
--- a/pkgs/development/libraries/wtk/default.nix
+++ b/pkgs/development/libraries/wtk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, requireFile, unzip, xlibs }:
+{ stdenv, requireFile, unzip, xorg }:
 
 assert stdenv.system == "i686-linux";
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ unzip ];
 
-  libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.cc ];
+  libraries = [ xorg.libXpm xorg.libXt xorg.libX11 xorg.libICE xorg.libSM stdenv.cc.cc ];
 
   meta = {
     homepage = http://java.sun.com/products/sjwtoolkit/download.html;
diff --git a/pkgs/development/libraries/xcb-util-cursor/HEAD.nix b/pkgs/development/libraries/xcb-util-cursor/HEAD.nix
index e503ade3ebc4..cf14490c5147 100644
--- a/pkgs/development/libraries/xcb-util-cursor/HEAD.nix
+++ b/pkgs/development/libraries/xcb-util-cursor/HEAD.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, bashInteractive, autoconf, automake, libtool, pkgconfig
-, git, xlibs, gnum4, libxcb, gperf }:
+, git, xorg, gnum4, libxcb, gperf }:
 
 stdenv.mkDerivation rec {
   name = "xcb-util-cursor-0.1.1-3-gf03cc27";
@@ -26,9 +26,9 @@ stdenv.mkDerivation rec {
     libtool
     libxcb
     pkgconfig
-    xlibs.utilmacros
-    xlibs.xcbutilimage
-    xlibs.xcbutilrenderutil
+    xorg.utilmacros
+    xorg.xcbutilimage
+    xorg.xcbutilrenderutil
   ];
 
   configurePhase = ''
diff --git a/pkgs/development/pharo/vm/default.nix b/pkgs/development/pharo/vm/default.nix
index b98d1f2385d2..a62088824ff3 100644
--- a/pkgs/development/pharo/vm/default.nix
+++ b/pkgs/development/pharo/vm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xlibs, alsaLib, cairo }:
+{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xorg, alsaLib, cairo }:
 
 stdenv.mkDerivation rec {
 
@@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
     unzip ${sources40Zip} -d $prefix/lib/pharo-vm/
   '';
 
-  buildInputs = [ bash unzip cmake glibc openssl gcc mesa freetype xlibs.libX11 xlibs.libICE xlibs.libSM alsaLib cairo ];
+  buildInputs = [ bash unzip cmake glibc openssl gcc mesa freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo ];
 
   meta = {
     description = "Clean and innovative Smalltalk-inspired environment";
diff --git a/pkgs/development/pure-modules/gl/default.nix b/pkgs/development/pure-modules/gl/default.nix
index 37026ad93443..eb1c01e4eeff 100644
--- a/pkgs/development/pure-modules/gl/default.nix
+++ b/pkgs/development/pure-modules/gl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, pure, freeglut, mesa, x11 }:
+{ stdenv, fetchurl, pkgconfig, pure, freeglut, mesa, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
   baseName = "gl";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ pkgconfig ];
-  propagatedBuildInputs = [ pure freeglut mesa x11 ];
+  propagatedBuildInputs = [ pure freeglut mesa xlibsWrapper ];
   makeFlags = "libdir=$(out)/lib prefix=$(out)/";
   setupHook = ../generic-setup-hook.sh;
 
diff --git a/pkgs/development/pure-modules/tk/default.nix b/pkgs/development/pure-modules/tk/default.nix
index b36a58279fa3..0fe1667b0406 100644
--- a/pkgs/development/pure-modules/tk/default.nix
+++ b/pkgs/development/pure-modules/tk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, pure, tcl, tk, x11 }:
+{ stdenv, fetchurl, pkgconfig, pure, tcl, tk, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
   baseName = "tk";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ pkgconfig ];
-  propagatedBuildInputs = [ pure tcl tk x11 ];
+  propagatedBuildInputs = [ pure tcl tk xlibsWrapper ];
   makeFlags = "libdir=$(out)/lib prefix=$(out)/";
   setupHook = ../generic-setup-hook.sh;
 
diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix
index 0589bec36b95..cb93ccc2b581 100644
--- a/pkgs/development/python-modules/pycairo/default.nix
+++ b/pkgs/development/python-modules/pycairo/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, x11, isPyPy }:
+{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, xlibsWrapper, isPyPy }:
 
 if isPyPy then throw "pycairo not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec {
   version = "1.10.0";
@@ -23,7 +23,7 @@ if isPyPy then throw "pycairo not supported for interpreter ${python.executable}
     sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4";
   };
 
-  buildInputs = [ python pkgconfig cairo x11 ];
+  buildInputs = [ python pkgconfig cairo xlibsWrapper ];
 
   configurePhase = ''
     (
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index 62d39d768f9f..a9d81f028f4a 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -235,7 +235,7 @@ let
     ChemmineOB = [ pkgs.openbabel pkgs.pkgconfig ];
     cit = [ pkgs.gsl ];
     curl = [ pkgs.curl ];
-    devEMF = [ pkgs.xlibs.libXft ];
+    devEMF = [ pkgs.xorg.libXft ];
     diversitree = [ pkgs.gsl pkgs.fftw ];
     EMCluster = [ pkgs.liblapack ];
     fftw = [ pkgs.fftw ];
@@ -289,7 +289,7 @@ let
     rgdal = [ pkgs.proj pkgs.gdal ];
     rgeos = [ pkgs.geos ];
     rggobi = [ pkgs.ggobi pkgs.gtk2 pkgs.libxml2 ];
-    rgl = [ pkgs.mesa pkgs.x11 ];
+    rgl = [ pkgs.mesa pkgs.xlibsWrapper ];
     Rglpk = [ pkgs.glpk ];
     RGtk2 = [ pkgs.gtk2 ];
     Rhpc = [ pkgs.zlib pkgs.bzip2 pkgs.icu pkgs.lzma pkgs.openmpi pkgs.pcre ];
@@ -340,7 +340,7 @@ let
     TAQMNGR = [ pkgs.zlib ];
     tiff = [ pkgs.libtiff ];
     TKF = [ pkgs.gsl ];
-    tkrplot = [ pkgs.xlibs.libX11 ];
+    tkrplot = [ pkgs.xorg.libX11 ];
     topicmodels = [ pkgs.gsl ];
     udunits2 = [ pkgs.udunits pkgs.expat ];
     V8 = [ pkgs.v8 ];
@@ -1632,7 +1632,7 @@ let
     });
 
     devEMF = old.devEMF.overrideDerivation (attrs: {
-      NIX_CFLAGS_LINK = "-L${pkgs.xlibs.libXft}/lib -lXft";
+      NIX_CFLAGS_LINK = "-L${pkgs.xorg.libXft}/lib -lXft";
     });
 
     slfm = old.slfm.overrideDerivation (attrs: {
diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix
index b3867be6377c..d686da98fa38 100644
--- a/pkgs/development/tools/electron/default.nix
+++ b/pkgs/development/tools/electron/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
 , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
-, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs, libcap, unzip
+, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, unzip
 , systemd
 }:
 let
@@ -9,9 +9,9 @@ let
     paths = [
       stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
       fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
-      xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
-      xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
-      xlibs.libXcursor libcap systemd
+      xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
+      xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
+      xorg.libXcursor libcap systemd
     ];
   };
 in stdenv.mkDerivation rec {
diff --git a/pkgs/development/tools/node-webkit/nw11.nix b/pkgs/development/tools/node-webkit/nw11.nix
index 978213f67601..ed3b99aad009 100644
--- a/pkgs/development/tools/node-webkit/nw11.nix
+++ b/pkgs/development/tools/node-webkit/nw11.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, buildEnv, makeWrapper
-, xlibs, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
+, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
 , gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev, libcap
 , libnotify}:
 let
@@ -9,10 +9,10 @@ let
   nwEnv = buildEnv {
     name = "node-webkit-env";
     paths = [
-      xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
-      freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage
-      xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc
-      xlibs.libXtst xlibs.libXi xlibs.libXcursor xlibs.libXrandr libcap
+      xorg.libX11 xorg.libXrender glib gtk atk pango cairo gdk_pixbuf
+      freetype fontconfig xorg.libXcomposite alsaLib xorg.libXdamage
+      xorg.libXext xorg.libXfixes nss nspr gconf expat dbus stdenv.cc
+      xorg.libXtst xorg.libXi xorg.libXcursor xorg.libXrandr libcap
       libnotify
     ];
   };
diff --git a/pkgs/development/tools/node-webkit/nw12.nix b/pkgs/development/tools/node-webkit/nw12.nix
index 0ad3ece24651..7492acb13678 100644
--- a/pkgs/development/tools/node-webkit/nw12.nix
+++ b/pkgs/development/tools/node-webkit/nw12.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, buildEnv, makeWrapper
-, xlibs, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
+, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
 , gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev, libcap
 , libnotify}:
 let
@@ -9,10 +9,10 @@ let
   nwEnv = buildEnv {
     name = "nwjs-env";
     paths = [
-      xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
-      freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage
-      xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc
-      xlibs.libXtst xlibs.libXi xlibs.libXcursor xlibs.libXrandr libcap
+      xorg.libX11 xorg.libXrender glib gtk atk pango cairo gdk_pixbuf
+      freetype fontconfig xorg.libXcomposite alsaLib xorg.libXdamage
+      xorg.libXext xorg.libXfixes nss nspr gconf expat dbus stdenv.cc
+      xorg.libXtst xorg.libXi xorg.libXcursor xorg.libXrandr libcap
       libnotify
     ];
   };
diff --git a/pkgs/development/tools/node-webkit/nw9.nix b/pkgs/development/tools/node-webkit/nw9.nix
index 97399e5268ce..213b94102b0d 100644
--- a/pkgs/development/tools/node-webkit/nw9.nix
+++ b/pkgs/development/tools/node-webkit/nw9.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, buildEnv, makeWrapper
-, xlibs, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
+, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
 , gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev}:
 let
   bits = if stdenv.system == "x86_64-linux" then "x64"
@@ -8,10 +8,10 @@ let
   nwEnv = buildEnv {
     name = "node-webkit-env";
     paths = [
-      xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
-      freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage
-      xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc.cc
-      xlibs.libXtst xlibs.libXi
+      xorg.libX11 xorg.libXrender glib gtk atk pango cairo gdk_pixbuf
+      freetype fontconfig xorg.libXcomposite alsaLib xorg.libXdamage
+      xorg.libXext xorg.libXfixes nss nspr gconf expat dbus stdenv.cc.cc
+      xorg.libXtst xorg.libXi
     ];
   };
 
diff --git a/pkgs/development/tools/selenium/server/default.nix b/pkgs/development/tools/selenium/server/default.nix
index 26435088aded..2efd85f84010 100644
--- a/pkgs/development/tools/selenium/server/default.nix
+++ b/pkgs/development/tools/selenium/server/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xlibs
+{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xorg
 , chromedriver, chromeSupport ? true }:
 
 with stdenv.lib;
@@ -29,7 +29,7 @@ in stdenv.mkDerivation rec {
     ${jdk}/bin/jar xf $src launchers/launcher-linux-amd64
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "${gcc.cc}/lib/:${gcc.cc}/lib64:${xlibs.libX11}/lib" \
+      --set-rpath "${gcc.cc}/lib/:${gcc.cc}/lib64:${xorg.libX11}/lib" \
       launchers/launcher-linux-${arch}
     ${jdk}/bin/jar uf $src launchers/launcher-linux-${arch}
   '';
diff --git a/pkgs/development/tools/thrust/default.nix b/pkgs/development/tools/thrust/default.nix
index a5bfb8bfc59f..a59d656b625a 100644
--- a/pkgs/development/tools/thrust/default.nix
+++ b/pkgs/development/tools/thrust/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, buildEnv, makeWrapper, glib, alsaLib , dbus, gtk, atk
 , pango, freetype, fontconfig, gdk_pixbuf , cairo, cups, expat, nspr, gconf, nss
-, xlibs, libcap, unzip
+, xorg, libcap, unzip
 }:
 
 let
@@ -8,9 +8,9 @@ let
     name = "env-thrust";
     paths = [
       stdenv.cc.cc glib dbus gtk atk pango freetype fontconfig gdk_pixbuf
-      cairo cups expat alsaLib nspr gconf nss xlibs.libXrender xlibs.libX11
-      xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXcomposite
-      xlibs.libXi xlibs.libXfixes xlibs.libXrandr xlibs.libXcursor libcap
+      cairo cups expat alsaLib nspr gconf nss xorg.libXrender xorg.libX11
+      xorg.libXext xorg.libXdamage xorg.libXtst xorg.libXcomposite
+      xorg.libXi xorg.libXfixes xorg.libXrandr xorg.libXcursor libcap
     ];
   };
 in stdenv.mkDerivation rec {
diff --git a/pkgs/games/adom/default.nix b/pkgs/games/adom/default.nix
index 74fe5232fa11..07075571c7e3 100644
--- a/pkgs/games/adom/default.nix
+++ b/pkgs/games/adom/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, patchelf, zlib, libmad, libpng12, libcaca, mesa, alsaLib, libpulseaudio
-, xlibs }:
+, xorg }:
 
 assert stdenv.system == "x86_64-linux";
 let
 
-  inherit (xlibs) libXext libX11;
+  inherit (xorg) libXext libX11;
 
   lpath = "${stdenv.cc.cc}/lib64:" + stdenv.lib.makeSearchPath "lib" [
       zlib libmad libpng12 libcaca libXext libX11 mesa alsaLib libpulseaudio];
diff --git a/pkgs/games/astromenace/default.nix b/pkgs/games/astromenace/default.nix
index 76aed3f2cc6a..681fec72f969 100644
--- a/pkgs/games/astromenace/default.nix
+++ b/pkgs/games/astromenace/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, cmake, x11, mesa, SDL, openal, freealut, libogg, libvorbis }:
+{ fetchurl, stdenv, cmake, xlibsWrapper, mesa, SDL, openal, freealut, libogg, libvorbis }:
 
 stdenv.mkDerivation rec {
   version = "1.3.2";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1rkz6lwjcd5mwv72kf07ghvx6z46kf3xs250mjbmnmjpn7r5sxwv";
   };
 
-  buildInputs = [ cmake x11 mesa SDL openal freealut libogg libvorbis ];
+  buildInputs = [ cmake xlibsWrapper mesa SDL openal freealut libogg libvorbis ];
 
   buildPhase = ''
     cmake ./
diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix
index 2de42fd86eed..059fa74f8be1 100644
--- a/pkgs/games/megaglest/default.nix
+++ b/pkgs/games/megaglest/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchgit, cmake, git, curl, SDL, xercesc, openal, lua
 , libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
-, fontconfig, freetype, xlibs, makeWrapper, bash, which, gnome3, mesa_glu
+, fontconfig, freetype, xorg, makeWrapper, bash, which, gnome3, mesa_glu
 , mesa_drivers }:
 let
   version = "3.9.2";
   lib-env = buildEnv {
     name = "megaglest-lib-env";
-    paths = [ SDL xlibs.libSM xlibs.libICE xlibs.libX11 xlibs.libXext
+    paths = [ SDL xorg.libSM xorg.libICE xorg.libX11 xorg.libXext
       xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype
       stdenv.cc.cc glew mesa_glu mesa_drivers wxGTK ];
   };
diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix
index 72673ea010c6..850b1d391c54 100644
--- a/pkgs/games/minetest/default.nix
+++ b/pkgs/games/minetest/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, cmake, irrlicht, libpng, bzip2, curl, libogg, jsoncpp
-, libjpeg, libXxf86vm, mesa, openal, libvorbis, x11, sqlite, luajit, freetype
+, libjpeg, libXxf86vm, mesa, openal, libvorbis, xlibsWrapper, sqlite, luajit, freetype
 , gettext
 }:
 
@@ -31,7 +31,7 @@ in stdenv.mkDerivation {
 
   buildInputs = [
     cmake irrlicht libpng bzip2 libjpeg curl libogg jsoncpp libXxf86vm mesa
-    openal libvorbis x11 sqlite luajit freetype gettext
+    openal libvorbis xlibsWrapper sqlite luajit freetype gettext
   ];
 
   postInstall = ''
diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix
index a94f388b322c..ed682e7bed93 100644
--- a/pkgs/games/planetaryannihilation/default.nix
+++ b/pkgs/games/planetaryannihilation/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, config, fetchurl, patchelf, makeWrapper, xlibs, gtk, glib, udev, alsaLib, atk
+{ stdenv, config, fetchurl, patchelf, makeWrapper, gtk, glib, udev, alsaLib, atk
 , nspr, fontconfig, cairo, pango, nss, freetype, gnome3, gdk_pixbuf, curl, systemd, xorg }:
 
 # TODO: use dynamic attributes once Nix 1.7 is out
@@ -34,12 +34,12 @@ stdenv.mkDerivation {
     ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
 
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA"
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc xlibs.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xlibs.libXext pango udev xlibs.libX11 xlibs.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xlibs.libXrender ]}:{stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host" 
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc xorg.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xorg.libXrender ]}:{stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host" 
 
-    wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc xlibs.libX11 xlibs.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64"
+    wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc xorg.libX11 xorg.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64"
 
     for f in $out/lib/*; do
-      patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc curl xlibs.libX11 stdenv.glibc xlibs.libXcursor "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" $f
+      patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc curl xorg.libX11 stdenv.glibc xorg.libXcursor "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" $f
     done
   '';
 
diff --git a/pkgs/games/quake3/game/default.nix b/pkgs/games/quake3/game/default.nix
index ed447004345e..2ad922834d38 100644
--- a/pkgs/games/quake3/game/default.nix
+++ b/pkgs/games/quake3/game/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, x11, SDL, mesa, openal, gcc46 }:
+{ lib, stdenv, fetchurl, xlibsWrapper, SDL, mesa, openal, gcc46 }:
 
 stdenv.mkDerivation {
   name = "ioquake3-1.36";
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
     ./botlib.patch
   ];
 
-  buildInputs = [ x11 SDL mesa openal gcc46 ];
+  buildInputs = [ xlibsWrapper SDL mesa openal gcc46 ];
 
   # Fix building on GCC 4.6.
   NIX_CFLAGS_COMPILE = "-Wno-error";
diff --git a/pkgs/games/sdlmame/default.nix b/pkgs/games/sdlmame/default.nix
index 6e063a34bc82..7cc4c2b96b1e 100644
--- a/pkgs/games/sdlmame/default.nix
+++ b/pkgs/games/sdlmame/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xlibs }:
+{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }:
 
 assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
 
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xlibs.libX11}/lib:${xlibs.libXinerama}/lib:${stdenv.cc.cc}/lib" \
+      --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xorg.libX11}/lib:${xorg.libXinerama}/lib:${stdenv.cc.cc}/lib" \
       share/sdlmame/sdlmame
 
     mkdir -p "$out/bin"
diff --git a/pkgs/games/snake4/default.nix b/pkgs/games/snake4/default.nix
index 081604d2ce8e..2899f7120983 100644
--- a/pkgs/games/snake4/default.nix
+++ b/pkgs/games/snake4/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, shhmsg, shhopt, xlibs }:
+{ stdenv, fetchurl, shhmsg, shhopt, xorg }:
 
 stdenv.mkDerivation rec {
   name = "snake4-1.0.14";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "14cng9l857np42zixp440mbc8y5675frb6lhsds53j1cws9cncw9";
   };
 
-  buildInputs = with xlibs; [ shhmsg shhopt libX11 libXt libXpm libXaw libXext];
+  buildInputs = with xorg; [ shhmsg shhopt libX11 libXt libXpm libXaw libXext];
 
   preInstall = ''
     substituteInPlace Makefile --replace "-o \$(OWNER) -g \$(GROUP)" ""
diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix
index aabd3656505b..fe764c90b4b0 100644
--- a/pkgs/games/spring/default.nix
+++ b/pkgs/games/spring/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, lzma, boost, libdevil, zlib, p7zip
-, openal, libvorbis, glew, freetype, xlibs, SDL, mesa, binutils
+, openal, libvorbis, glew, freetype, xorg, SDL, mesa, binutils
 , asciidoc, libxslt, docbook_xsl, docbook_xsl_ns, curl, makeWrapper
 , jdk ? null, python ? null, systemd
 , withAI ? true # support for AI Interfaces and Skirmish AIs
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
                 "-DPREFER_STATIC_LIBS:BOOL=OFF"];
 
   buildInputs = [ cmake lzma boost libdevil zlib p7zip openal libvorbis freetype SDL
-    xlibs.libX11 xlibs.libXcursor mesa glew asciidoc libxslt docbook_xsl curl makeWrapper
+    xorg.libX11 xorg.libXcursor mesa glew asciidoc libxslt docbook_xsl curl makeWrapper
     docbook_xsl_ns systemd ]
     ++ stdenv.lib.optional withAI jdk
     ++ stdenv.lib.optional withAI python;
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index b9d13265ce76..ffd68562dee8 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -13,7 +13,7 @@ buildFHSUserEnv {
       pkgs.python
       pkgs.gnome2.zenity
       pkgs.xdg_utils
-      pkgs.xlibs.xrandr
+      pkgs.xorg.xrandr
       pkgs.which
     ]
     ++ lib.optional (config.steam.java or false) pkgs.jdk
@@ -28,23 +28,23 @@ buildFHSUserEnv {
       pkgs.pango
 
       pkgs.freetype
-      pkgs.xlibs.libICE
-      pkgs.xlibs.libSM
-      pkgs.xlibs.libX11
-      pkgs.xlibs.libXau
-      pkgs.xlibs.libxcb
-      pkgs.xlibs.libXcursor
-      pkgs.xlibs.libXdamage
-      pkgs.xlibs.libXdmcp
-      pkgs.xlibs.libXext
-      pkgs.xlibs.libXfixes
-      pkgs.xlibs.libXi
-      pkgs.xlibs.libXinerama
-      pkgs.xlibs.libXrandr
-      pkgs.xlibs.libXrender
-      pkgs.xlibs.libXScrnSaver
-      pkgs.xlibs.libXtst
-      pkgs.xlibs.libXxf86vm
+      pkgs.xorg.libICE
+      pkgs.xorg.libSM
+      pkgs.xorg.libX11
+      pkgs.xorg.libXau
+      pkgs.xorg.libxcb
+      pkgs.xorg.libXcursor
+      pkgs.xorg.libXdamage
+      pkgs.xorg.libXdmcp
+      pkgs.xorg.libXext
+      pkgs.xorg.libXfixes
+      pkgs.xorg.libXi
+      pkgs.xorg.libXinerama
+      pkgs.xorg.libXrandr
+      pkgs.xorg.libXrender
+      pkgs.xorg.libXScrnSaver
+      pkgs.xorg.libXtst
+      pkgs.xorg.libXxf86vm
 
       pkgs.ffmpeg
       pkgs.libpng12
diff --git a/pkgs/games/ue4demos/default.nix b/pkgs/games/ue4demos/default.nix
index a0e583e1075f..ed2ea23d4158 100644
--- a/pkgs/games/ue4demos/default.nix
+++ b/pkgs/games/ue4demos/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, patchelf, xlibs, openal }:
+{ stdenv, fetchurl, unzip, patchelf, xorg, openal }:
 
 assert stdenv.isLinux;
 assert stdenv.isx86_64;
@@ -11,7 +11,7 @@ let
       buildInputs = [ unzip patchelf ];
 
       rtdeps = stdenv.lib.makeLibraryPath
-        [ xlibs.libXxf86vm xlibs.libXext openal ]
+        [ xorg.libXxf86vm xorg.libXext openal ]
         + ":" + stdenv.lib.makeSearchPath "lib64" [ stdenv.cc.cc ];
 
       buildCommand =
diff --git a/pkgs/games/ut2004demo/default.nix b/pkgs/games/ut2004demo/default.nix
index a828d22ca0b0..13f770eab2bc 100644
--- a/pkgs/games/ut2004demo/default.nix
+++ b/pkgs/games/ut2004demo/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, xlibs, mesa}:
+{stdenv, fetchurl, xorg, mesa}:
 
 assert stdenv.system == "i686-linux";
 
@@ -17,7 +17,7 @@ let {
     name = raw.name;
     builder = ./make-wrapper.sh;
     inherit raw mesa;
-    inherit (xlibs) libX11 libXext;
+    inherit (xorg) libX11 libXext;
   };
 
 }
diff --git a/pkgs/games/voxelands/default.nix b/pkgs/games/voxelands/default.nix
index 7d96829f12b5..4c0c76d60b8c 100644
--- a/pkgs/games/voxelands/default.nix
+++ b/pkgs/games/voxelands/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, irrlicht, libpng, bzip2, sqlite
-, libjpeg, libXxf86vm, mesa, openal, libvorbis, x11, pkgconfig }:
+, libjpeg, libXxf86vm, mesa, openal, libvorbis, xlibsWrapper, pkgconfig }:
 
 stdenv.mkDerivation rec {
   name = "voxelands-${version}";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     cmake irrlicht libpng bzip2 libjpeg sqlite
-    libXxf86vm mesa openal libvorbis x11 pkgconfig
+    libXxf86vm mesa openal libvorbis xlibsWrapper pkgconfig
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/games/zoom/default.nix b/pkgs/games/zoom/default.nix
index cb9974580d87..200b9c24c7db 100644
--- a/pkgs/games/zoom/default.nix
+++ b/pkgs/games/zoom/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, perl, expat, x11, freetype }:
+{ stdenv, fetchurl, perl, expat, xlibsWrapper, freetype }:
 
-# !!! assert freetype == xlibs.freetype
+# !!! assert freetype == xorg.freetype
 
 stdenv.mkDerivation {
   name = "zoom-1.1.5";
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
     sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj";
   };
   
-  buildInputs = [ perl expat x11 freetype ];
+  buildInputs = [ perl expat xlibsWrapper freetype ];
   
   # Zoom doesn't add the right directory in the include path.
   CFLAGS = [ "-I" (freetype + "/include/freetype2") ];
diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix
index 32d47093d68c..c1ff6cb94934 100644
--- a/pkgs/misc/emulators/snes9x-gtk/default.nix
+++ b/pkgs/misc/emulators/snes9x-gtk/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa, intltool, gtk, pkgconfig, libxml2, x11, libpulseaudio}:
+{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa, intltool, gtk, pkgconfig, libxml2, xlibsWrapper, libpulseaudio}:
 
 stdenv.mkDerivation rec {
   name = "snes9x-gtk-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "9f7c5d2d0fa3fe753611cf94e8879b73b8bb3c0eab97cdbcb6ab7376efa78dc3";
   };
 
-  buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk pkgconfig libxml2 x11 libpulseaudio];
+  buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk pkgconfig libxml2 xlibsWrapper libpulseaudio];
 
   sourceRoot = "snes9x-${version}-src/gtk";
 
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
index bf63340d35d0..1e2d656fb0ef 100644
--- a/pkgs/misc/emulators/wine/base.nix
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -19,8 +19,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
 
   nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
     freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
-  ]) ++ (with pkgs.xlibs; [
-    xlibs libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
+  ]) ++ (with pkgs.xorg; [
+    xlibsWrapper libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
   ]));
 
   # Wine locates a lot of libraries dynamically through dlopen().  Add
diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix
index 4d9d9cedde59..9f930900c410 100644
--- a/pkgs/misc/ghostscript/default.nix
+++ b/pkgs/misc/ghostscript/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, zlib, expat, openssl
 , libjpeg, libpng, libtiff, freetype, fontconfig, lcms2, libpaper, jbig2dec
 , libiconv
-, x11Support ? false, x11 ? null
+, x11Support ? false, xlibsWrapper ? null
 , cupsSupport ? false, cups ? null
 }:
 
-assert x11Support -> x11 != null;
+assert x11Support -> xlibsWrapper != null;
 assert cupsSupport -> cups != null;
 let
   version = "9.15";
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
       libjpeg libpng libtiff freetype fontconfig lcms2 libpaper jbig2dec
       libiconv
     ]
-    ++ stdenv.lib.optional x11Support x11
+    ++ stdenv.lib.optional x11Support xlibsWrapper
     ++ stdenv.lib.optional cupsSupport cups
     # [] # maybe sometimes jpeg2000 support
     ;
diff --git a/pkgs/misc/screensavers/electricsheep/default.nix b/pkgs/misc/screensavers/electricsheep/default.nix
index dca60f55af03..27e26d6d5df7 100644
--- a/pkgs/misc/screensavers/electricsheep/default.nix
+++ b/pkgs/misc/screensavers/electricsheep/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, expat, zlib, libpng, libjpeg, xlibs}:
+{stdenv, fetchurl, pkgconfig, expat, zlib, libpng, libjpeg, xorg}:
 
 stdenv.mkDerivation rec {
   name = "electricsheep-2.6.8";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "1flqcqfs75wg74hr5w85n6w8b26l4qrpwzi7fzylnry67yzf94y5";
   };
 
-  buildInputs = [pkgconfig expat zlib libpng libjpeg xlibs.xlibs xlibs.libXv];
+  buildInputs = [pkgconfig expat zlib libpng libjpeg xorg.xlibsWrapper xorg.libXv];
 
   preInstall = ''
     installFlags=GNOME_DATADIR=$out
diff --git a/pkgs/misc/screensavers/rss-glx/default.nix b/pkgs/misc/screensavers/rss-glx/default.nix
index 56d176a710cd..606a4200d0eb 100644
--- a/pkgs/misc/screensavers/rss-glx/default.nix
+++ b/pkgs/misc/screensavers/rss-glx/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, x11, libXext, mesa, imagemagick, libtiff, bzip2}:
+{stdenv, fetchurl, pkgconfig, xlibsWrapper, libXext, mesa, imagemagick, libtiff, bzip2}:
 
 stdenv.mkDerivation rec {
   version = "0.9.1";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1aikafjqrfmv23jnrrm5d56dg6injh4l67zjdxzdapv9chw7g3cg";
   };
 
-  buildInputs = [ pkgconfig mesa x11 imagemagick libtiff bzip2 ];
+  buildInputs = [ pkgconfig mesa xlibsWrapper imagemagick libtiff bzip2 ];
 
   NIX_CFLAGS_COMPILE = "-I${imagemagick}/include/ImageMagick";
   NIX_LDFLAGS= "-rpath ${libXext}/lib";
diff --git a/pkgs/misc/screensavers/xautolock/default.nix b/pkgs/misc/screensavers/xautolock/default.nix
index 114d745f140a..b40827e7bfbc 100644
--- a/pkgs/misc/screensavers/xautolock/default.nix
+++ b/pkgs/misc/screensavers/xautolock/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11, imake, libXScrnSaver, scrnsaverproto}:
+{stdenv, fetchurl, xlibsWrapper, imake, libXScrnSaver, scrnsaverproto}:
 
 stdenv.mkDerivation rec
 {
@@ -11,5 +11,5 @@ stdenv.mkDerivation rec
   makeFlags="BINDIR=\${out}/bin MANPATH=\${out}/man";
   preBuild = "xmkmf";
   installTargets = "install install.man";
-  buildInputs = [x11 imake libXScrnSaver scrnsaverproto];
+  buildInputs = [xlibsWrapper imake libXScrnSaver scrnsaverproto];
 }
diff --git a/pkgs/misc/screensavers/xtrlock-pam/default.nix b/pkgs/misc/screensavers/xtrlock-pam/default.nix
index 16a6622aa22d..1f12ffa93015 100644
--- a/pkgs/misc/screensavers/xtrlock-pam/default.nix
+++ b/pkgs/misc/screensavers/xtrlock-pam/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, python, pkgconfig, x11, pam }:
+{ stdenv, fetchgit, python, pkgconfig, xlibsWrapper, pam }:
 
 stdenv.mkDerivation {
   name = "xtrlock-pam-3.4-post-20150909";
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     sha256 = "fa8aeedfa2a4e1d813f8cad562bafdd4e2c5130df0a7cde7b2f956a32044e9f8";
   };
 
-  buildInputs = [ python pkgconfig x11 pam ];
+  buildInputs = [ python pkgconfig xlibsWrapper pam ];
 
   configurePhase = ''
     substituteInPlace .config/options.py --replace /usr/include/security/pam_appl.h ${pam}/include/security/pam_appl.h
diff --git a/pkgs/misc/themes/qtcurve/default.nix b/pkgs/misc/themes/qtcurve/default.nix
index e63f68460022..2aa73f1e0c17 100644
--- a/pkgs/misc/themes/qtcurve/default.nix
+++ b/pkgs/misc/themes/qtcurve/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, cmake, gettext, pkgconfig # Build tools
 , gtk2, kde_workspace, kdelibs # Toolkit dependencies
-, libpthreadstubs, libXdmcp, libxcb, xlibs # X11 dependencies
+, libpthreadstubs, libXdmcp, libxcb, xorg # X11 dependencies
 }:
 
 stdenv.mkDerivation {
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
     libXdmcp
     libxcb
     pkgconfig
-    xlibs.libxshmfence
+    xorg.libxshmfence
   ];
 
   patches = [
diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix
index 834e798e8d1d..bb0888855095 100644
--- a/pkgs/os-specific/linux/ati-drivers/default.nix
+++ b/pkgs/os-specific/linux/ati-drivers/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel ? null, xlibs, which, imake
+{ stdenv, fetchurl, kernel ? null, which, imake
 , mesa # for fgl_glxgears
 , libXxf86vm, xf86vidmodeproto # for fglrx_gamma
 , xorg, makeWrapper, glibc, patchelf
@@ -48,8 +48,8 @@ stdenv.mkDerivation {
   patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}";
 
   buildInputs =
-    [ xlibs.libXext xlibs.libX11 xlibs.libXinerama
-      xlibs.libXrandr which imake makeWrapper
+    [ xorg.libXext xorg.libX11 xorg.libXinerama
+      xorg.libXrandr which imake makeWrapper
       patchelf
       unzip
       mesa
diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix
index 60bfe0930171..b857d5ece451 100644
--- a/pkgs/os-specific/linux/conky/default.nix
+++ b/pkgs/os-specific/linux/conky/default.nix
@@ -9,7 +9,7 @@
 
 # optional features with extra dependencies
 , ncursesSupport      ? true      , ncurses       ? null
-, x11Support          ? true      , x11           ? null
+, x11Support          ? true      , xlibsWrapper           ? null
 , xdamageSupport      ? x11Support, libXdamage    ? null
 , imlib2Support       ? x11Support, imlib2        ? null
 
@@ -29,7 +29,7 @@
 
 assert ncursesSupport      -> ncurses != null;
 
-assert x11Support          -> x11 != null;
+assert x11Support          -> xlibsWrapper != null;
 assert xdamageSupport      -> x11Support && libXdamage != null;
 assert imlib2Support       -> x11Support && imlib2     != null;
 assert luaSupport          -> lua != null;
@@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig glib cmake ]
     ++ optional  ncursesSupport     ncurses
-    ++ optional  x11Support         x11
+    ++ optional  x11Support         xlibsWrapper
     ++ optional  xdamageSupport     libXdamage
     ++ optional  imlib2Support      imlib2
     ++ optional  luaSupport         lua
diff --git a/pkgs/os-specific/linux/nvidia-x11/beta.nix b/pkgs/os-specific/linux/nvidia-x11/beta.nix
index dc6af818837a..d3111a4f75a1 100644
--- a/pkgs/os-specific/linux/nvidia-x11/beta.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/beta.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl
+{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl
 , gtk, atk, pango, glib, gdk_pixbuf, cairo, nukeReferences
 , # Whether to build the libraries only (i.e. not the kernel module or
   # nvidia-settings).  Used to support 32-bit binaries on 64-bit
@@ -43,14 +43,14 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  glPath      = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
+  glPath      = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
   cudaPath    = makeLibraryPath [zlib stdenv.cc.cc];
   openclPath  = makeLibraryPath [zlib];
-  allLibPath  = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc];
+  allLibPath  = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc];
 
   gtkPath = optionalString (!libsOnly) (makeLibraryPath
     [ gtk atk pango glib gdk_pixbuf cairo ] );
-  programPath = makeLibraryPath [ xlibs.libXv ];
+  programPath = makeLibraryPath [ xorg.libXv ];
 
   buildInputs = [ perl nukeReferences ];
 
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index 953c8c601253..4390d5bdf3cd 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl
+{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl
 , gtk, atk, pango, glib, gdk_pixbuf, cairo, nukeReferences
 , # Whether to build the libraries only (i.e. not the kernel module or
   # nvidia-settings).  Used to support 32-bit binaries on 64-bit
@@ -46,14 +46,14 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  glPath      = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
+  glPath      = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
   cudaPath    = makeLibraryPath [zlib stdenv.cc.cc];
   openclPath  = makeLibraryPath [zlib];
-  allLibPath  = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc];
+  allLibPath  = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc];
 
   gtkPath = optionalString (!libsOnly) (makeLibraryPath
     [ gtk atk pango glib gdk_pixbuf cairo ] );
-  programPath = makeLibraryPath [ xlibs.libXv ];
+  programPath = makeLibraryPath [ xorg.libXv ];
 
   buildInputs = [ perl nukeReferences ];
 
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
index 432a756b6f6b..6bde91d0ffc8 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, kernel, xlibs, zlib, gtk, atk, pango, glib, gdk_pixbuf}:
+{stdenv, fetchurl, kernel, xorg, zlib, gtk, atk, pango, glib, gdk_pixbuf}:
 
 let
 
@@ -30,11 +30,11 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
+  glPath = stdenv.lib.makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
 
   cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc];
 
-  programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ];
+  programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xorg.libXv ];
 
   meta = {
     homepage = http://www.nvidia.com/object/unix.html;
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
index 7f13b6795d47..42e65f927b31 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl
+{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl
 , gtk, atk, pango, glib, gdk_pixbuf
 , # Whether to build the libraries only (i.e. not the kernel module or
   # nvidia-settings).  Used to support 32-bit binaries on 64-bit
@@ -36,12 +36,12 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
+  glPath = stdenv.lib.makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
 
   cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc];
 
   programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath
-    [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] );
+    [ gtk atk pango glib gdk_pixbuf xorg.libXv ] );
 
   buildInputs = [ perl ];
 
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix
index a53906ed0200..bb974410e371 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl
+{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl
 , gtk, atk, pango, glib, gdk_pixbuf
 , # Whether to build the libraries only (i.e. not the kernel module or
   # nvidia-settings).  Used to support 32-bit binaries on 64-bit
@@ -46,13 +46,13 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  glPath      = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
+  glPath      = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
   cudaPath    = makeLibraryPath [zlib stdenv.cc.cc];
   openclPath  = makeLibraryPath [zlib];
-  allLibPath  = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc];
+  allLibPath  = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc];
 
   programPath = optionalString (!libsOnly) (makeLibraryPath
-    [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] );
+    [ gtk atk pango glib gdk_pixbuf xorg.libXv ] );
 
   buildInputs = [ perl ];
 
diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix
index 2cebb8d9dcc2..5bb757a73a06 100644
--- a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix
+++ b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix
@@ -6,11 +6,11 @@
 # Of course, use of the driver in /usr/lib is highly impure.  But it
 # might actually work ;-)
 
-{stdenv, xlibs, expat, libdrm}:
+{stdenv, xorg, expat, libdrm}:
 
 stdenv.mkDerivation {
   name = "xorg-sys-opengl-3";
   builder = ./builder.sh;
-  neededLibs = [xlibs.libXxf86vm xlibs.libXext expat libdrm stdenv.cc.cc];
+  neededLibs = [xorg.libXxf86vm xorg.libXext expat libdrm stdenv.cc.cc];
 }
 
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index e018c7790b9a..86bcb3e1cec0 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchurl, pkgconfig, intltool, autoreconfHook
 , json_c, libsndfile, libtool
-, xlibs, libcap, alsaLib, glib
+, xorg, libcap, alsaLib, glib
 , avahi, libjack2, libasyncns, lirc, dbus
 , sbc, bluez5, udev, openssl, fftwFloat
 , speexdsp, systemd, webrtc-audio-processing, gconf ? null
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
     ++ lib.optionals (!libOnly) (
       [ libasyncns webrtc-audio-processing ]
       ++ lib.optional jackaudioSupport libjack2
-      ++ lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
+      ++ lib.optionals x11Support [ xorg.xlibsWrapper xorg.libXtst xorg.libXi ]
       ++ lib.optional useSystemd systemd
       ++ lib.optionals stdenv.isLinux [ alsaLib udev ]
       ++ lib.optional airtunesSupport openssl
diff --git a/pkgs/tools/X11/primus/lib.nix b/pkgs/tools/X11/primus/lib.nix
index fb18907c50ff..96a4ac16c9b1 100644
--- a/pkgs/tools/X11/primus/lib.nix
+++ b/pkgs/tools/X11/primus/lib.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit
-, x11, mesa
+, xlibsWrapper, mesa
 , nvidia
 }:
 let
@@ -15,6 +15,6 @@ stdenv.mkDerivation {
 
   inherit nvidia mesa;
 
-  buildInputs = [ x11 mesa ];
+  buildInputs = [ xlibsWrapper mesa ];
   builder = ./builder.sh;
 }
diff --git a/pkgs/tools/X11/vdpauinfo/default.nix b/pkgs/tools/X11/vdpauinfo/default.nix
index 167c710dd264..7a18a6a98b60 100644
--- a/pkgs/tools/X11/vdpauinfo/default.nix
+++ b/pkgs/tools/X11/vdpauinfo/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, xlibs, libvdpau }:
+{ stdenv, fetchurl, pkgconfig, xorg, libvdpau }:
 
 stdenv.mkDerivation rec {
   name = "vdpauinfo-1.0";
diff --git a/pkgs/tools/X11/xbrightness/default.nix b/pkgs/tools/X11/xbrightness/default.nix
index cb10718a11b9..e7c5c5baf458 100644
--- a/pkgs/tools/X11/xbrightness/default.nix
+++ b/pkgs/tools/X11/xbrightness/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xlibs }:
+{ stdenv, fetchurl, xorg }:
 
 stdenv.mkDerivation {
 
@@ -9,13 +9,13 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [
-    xlibs.imake
-    xlibs.libX11
-    xlibs.libXaw
-    xlibs.libXext
-    xlibs.libXmu
-    xlibs.libXpm
-    xlibs.libXxf86vm
+    xorg.imake
+    xorg.libX11
+    xorg.libXaw
+    xorg.libXext
+    xorg.libXmu
+    xorg.libXpm
+    xorg.libXxf86vm
   ];
 
   configurePhase = "xmkmf";
diff --git a/pkgs/tools/X11/xinput_calibrator/default.nix b/pkgs/tools/X11/xinput_calibrator/default.nix
index 8f21f6558ffc..eda19b7a5bfa 100644
--- a/pkgs/tools/X11/xinput_calibrator/default.nix
+++ b/pkgs/tools/X11/xinput_calibrator/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libXi, inputproto, autoconf, automake, libtool, m4, x11, pkgconfig }:
+{ stdenv, fetchurl, libXi, inputproto, autoconf, automake, libtool, m4, xlibsWrapper, pkgconfig }:
 
 stdenv.mkDerivation rec {
   version = "0.7.5";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   preConfigure = "./autogen.sh --with-gui=X11";
 
-  buildInputs = [ inputproto libXi autoconf automake libtool m4 x11 pkgconfig ];
+  buildInputs = [ inputproto libXi autoconf automake libtool m4 xlibsWrapper pkgconfig ];
 
   meta = {
     homepage = https://github.com/tias/xinput_calibrator;
diff --git a/pkgs/tools/X11/xrestop/default.nix b/pkgs/tools/X11/xrestop/default.nix
index 5158963258c2..2f18f678483b 100644
--- a/pkgs/tools/X11/xrestop/default.nix
+++ b/pkgs/tools/X11/xrestop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xlibs, pkgconfig, ncurses }:
+{ stdenv, fetchurl, xorg, pkgconfig, ncurses }:
 stdenv.mkDerivation rec {
 
   name = "xrestop-${version}";
@@ -9,5 +9,5 @@ stdenv.mkDerivation rec {
     sha256 = "0mz27jpij8am1s32i63mdm58znfijcpfhdqq1npbmvgclyagrhk7";
   };
 
-  buildInputs = [ pkgconfig xlibs.libX11 xlibs.libXres xlibs.libXext ncurses ];
+  buildInputs = [ pkgconfig xorg.libX11 xorg.libXres xorg.libXext ncurses ];
 }
diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix
index a1a091a90cca..22b8a607fd34 100644
--- a/pkgs/tools/admin/tightvnc/default.nix
+++ b/pkgs/tools/admin/tightvnc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, x11, zlib, libjpeg, imake, gccmakedep, libXmu
+{ stdenv, fetchurl, xlibsWrapper, zlib, libjpeg, imake, gccmakedep, libXmu
 , libXaw, libXpm, libXp , perl, xauth, fontDirectories, openssh }:
 
 stdenv.mkDerivation {
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   inherit xauth fontDirectories perl;
   gcc = stdenv.cc.cc;
 
-  buildInputs = [ x11 zlib libjpeg imake gccmakedep libXmu libXaw
+  buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
                   libXpm libXp xauth openssh ];
 
   patchPhase = ''
diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index d214a75b4416..01c6501f8409 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -1,5 +1,5 @@
 {stdenv, fetchFromGitHub, autoconf, automake, makeWrapper, pkgconfig
-, gnome3, avahi, gtk3, libnotify, libpulseaudio, x11}:
+, gnome3, avahi, gtk3, libnotify, libpulseaudio, xlibsWrapper}:
 
 stdenv.mkDerivation rec {
   name = "pasystray-0.5.2";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ autoconf automake makeWrapper pkgconfig 
                   gnome3.defaultIconTheme
-                  avahi gtk3 libnotify libpulseaudio x11 ];
+                  avahi gtk3 libnotify libpulseaudio xlibsWrapper ];
 
   preConfigure = ''
     aclocal
diff --git a/pkgs/tools/graphics/glmark2/default.nix b/pkgs/tools/graphics/glmark2/default.nix
index 97fcd1addd01..12ae9b6d89bd 100644
--- a/pkgs/tools/graphics/glmark2/default.nix
+++ b/pkgs/tools/graphics/glmark2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libjpeg, libpng12, xlibs, libX11, mesa, libdrm, python27 }:
+{ stdenv, fetchurl, pkgconfig, libjpeg, libpng12, xorg, libX11, mesa, libdrm, python27 }:
 stdenv.mkDerivation rec {
   name = "glmark2-${version}";
   version = "2014.03";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    pkgconfig libjpeg libpng12 xlibs.libxcb libX11 mesa libdrm python27
+    pkgconfig libjpeg libpng12 xorg.libxcb libX11 mesa libdrm python27
   ];
 
   buildPhase = ''
diff --git a/pkgs/tools/graphics/glxinfo/default.nix b/pkgs/tools/graphics/glxinfo/default.nix
index d0235c5bade4..35bc1e610de7 100644
--- a/pkgs/tools/graphics/glxinfo/default.nix
+++ b/pkgs/tools/graphics/glxinfo/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11, mesa}:
+{stdenv, fetchurl, xlibsWrapper, mesa}:
 
 let version = "8.1.0"; in
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
     sha256 = "0a58hw5850731p4smz4zqsbvyxvgjf7n5xdbs9l1wamk8q3gl0wp";
   };
 
-  buildInputs = [x11 mesa];
+  buildInputs = [xlibsWrapper mesa];
 
   configurePhase = "true";
 
diff --git a/pkgs/tools/graphics/graphviz/2.0.nix b/pkgs/tools/graphics/graphviz/2.0.nix
index fcc06871ef15..04fff8053819 100644
--- a/pkgs/tools/graphics/graphviz/2.0.nix
+++ b/pkgs/tools/graphics/graphviz/2.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, x11, libpng, libjpeg, expat, libXaw
+{ stdenv, fetchurl, pkgconfig, xlibsWrapper, libpng, libjpeg, expat, libXaw
 , yacc, libtool, fontconfig, pango, gd
 }:
 
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "39b8e1f2ba4cc1f5bdc8e39c7be35e5f831253008e4ee2c176984f080416676c";
   };
 
-  buildInputs = [pkgconfig x11 libpng libjpeg expat libXaw yacc libtool fontconfig pango gd];
+  buildInputs = [pkgconfig xlibsWrapper libpng libjpeg expat libXaw yacc libtool fontconfig pango gd];
   
   configureFlags =
     [ "--with-pngincludedir=${libpng}/include"
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
       "--with-expatincludedir=${expat}/include"
       "--with-expatlibdir=${expat}/lib"
     ]
-    ++ stdenv.lib.optional (x11 == null) "--without-x";
+    ++ stdenv.lib.optional (xlibsWrapper == null) "--without-x";
 
   meta = {
     description = "A program for visualising graphs";
diff --git a/pkgs/tools/graphics/graphviz/2.32.nix b/pkgs/tools/graphics/graphviz/2.32.nix
index 801795397014..2743bd78aa7c 100644
--- a/pkgs/tools/graphics/graphviz/2.32.nix
+++ b/pkgs/tools/graphics/graphviz/2.32.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw
-, yacc, libtool, fontconfig, pango, gd, xlibs, gts, gettext, cairo
+, yacc, libtool, fontconfig, pango, gd, xorg, gts, gettext, cairo
 }:
 
 stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ pkgconfig libpng libjpeg expat libXaw yacc libtool fontconfig
       pango gd gts
-    ] ++ stdenv.lib.optionals (xlibs != null) [ xlibs.xlibs xlibs.libXrender ]
+    ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender ]
     ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext;
 
   CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo}/include/cairo";
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
       "--with-cgraph=no"
       "--with-sparse=no"
     ]
-    ++ stdenv.lib.optional (xlibs == null) "--without-x";
+    ++ stdenv.lib.optional (xorg == null) "--without-x";
 
   preBuild = ''
     sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index 2fcea02519a5..fbf1c114d0a6 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw
-, yacc, libtool, fontconfig, pango, gd, xlibs, gts, libdevil, gettext, cairo
+, yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo
 , flex
 }:
 
@@ -22,10 +22,10 @@ stdenv.mkDerivation rec {
 
   buildInputs =
     [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex
-    ] ++ stdenv.lib.optionals (xlibs != null) [ xlibs.xlibs xlibs.libXrender pango libXaw ]
+    ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender pango libXaw ]
     ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext;
 
-  CPPFLAGS = stdenv.lib.optionalString (xlibs != null && stdenv.system == "x86_64-darwin")
+  CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin")
     "-I${cairo}/include/cairo";
 
   configureFlags =
@@ -36,14 +36,14 @@ stdenv.mkDerivation rec {
       "--with-expatincludedir=${expat}/include"
       "--with-expatlibdir=${expat}/lib"
     ]
-    ++ stdenv.lib.optional (xlibs == null) "--without-x";
+    ++ stdenv.lib.optional (xorg == null) "--without-x";
 
   preBuild = ''
     sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile
   '';
 
   # "command -v" is POSIX, "which" is not
-  postInstall = stdenv.lib.optionalString (xlibs != null) ''
+  postInstall = stdenv.lib.optionalString (xorg != null) ''
     sed -i 's|`which lefty`|"'$out'/bin/lefty"|' $out/bin/dotty
     sed -i 's|which|command -v|' $out/bin/vimdot
   '';
diff --git a/pkgs/tools/graphics/scrot/default.nix b/pkgs/tools/graphics/scrot/default.nix
index 411e2fb45c87..aa8958bb63df 100644
--- a/pkgs/tools/graphics/scrot/default.nix
+++ b/pkgs/tools/graphics/scrot/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, giblib, x11 }:
+{ stdenv, fetchurl, giblib, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
   name = "scrot-0.8";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "1wll744rhb49lvr2zs6m93rdmiq59zm344jzqvijrdn24ksiqgb1";
   };
 
-  buildInputs = [ giblib x11 ];
+  buildInputs = [ giblib xlibsWrapper ];
 
   meta = {
     homepage = http://linuxbrit.co.uk/scrot/;
diff --git a/pkgs/tools/inputmethods/touchegg/default.nix b/pkgs/tools/inputmethods/touchegg/default.nix
index 1cf3cfa00af7..4ac3c02d4103 100644
--- a/pkgs/tools/inputmethods/touchegg/default.nix
+++ b/pkgs/tools/inputmethods/touchegg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xlibs, xorgserver, qt4, mesa, geis  }:
+{ stdenv, fetchurl, xorg, xorgserver, qt4, mesa, geis  }:
 
 stdenv.mkDerivation rec {
   name = "touchegg-${version}";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "95734815c7219d9a71282f3144b3526f2542b4fa270a8e69d644722d024b4038";
   };
 
-  buildInputs = [ xorgserver mesa xlibs.libX11 xlibs.libXtst xlibs.libXext qt4 geis ];
+  buildInputs = [ xorgserver mesa xorg.libX11 xorg.libXtst xorg.libXext qt4 geis ];
 
   configurePhase = ''
     sed -e "s@/usr/@$out/@g" -i $(find . -name touchegg.pro)
diff --git a/pkgs/tools/misc/antimicro/default.nix b/pkgs/tools/misc/antimicro/default.nix
index 80791756e659..a2eed9139306 100644
--- a/pkgs/tools/misc/antimicro/default.nix
+++ b/pkgs/tools/misc/antimicro/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, cmake, pkgconfig, SDL2, qt5, xlibs, fetchzip }:
+{ stdenv, cmake, pkgconfig, SDL2, qt5, xorg, fetchzip }:
 
 stdenv.mkDerivation rec {
   name = "antimicro-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    cmake pkgconfig SDL2 qt5.base qt5.tools xlibs.libXtst
+    cmake pkgconfig SDL2 qt5.base qt5.tools xorg.libXtst
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/ocz-ssd-guru/default.nix b/pkgs/tools/misc/ocz-ssd-guru/default.nix
index 7ee6089c2496..21786f3f15f5 100644
--- a/pkgs/tools/misc/ocz-ssd-guru/default.nix
+++ b/pkgs/tools/misc/ocz-ssd-guru/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, xlibs, freetype, fontconfig, mesa, glibc, makeWrapper }:
+{ fetchurl, stdenv, xorg, freetype, fontconfig, mesa, glibc, makeWrapper }:
 
 let
   system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32";
@@ -15,13 +15,13 @@ stdenv.mkDerivation rec {
   buildInputs = [ makeWrapper ];
 
   libPath = stdenv.lib.makeLibraryPath [
-      xlibs.libX11
-      xlibs.libxcb
+      xorg.libX11
+      xorg.libxcb
       freetype
       fontconfig
-      xlibs.libXext
-      xlibs.libXi
-      xlibs.libXrender
+      xorg.libXext
+      xorg.libXi
+      xorg.libXrender
       stdenv.cc.cc
       glibc
       mesa
diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix
index 89459eb281bc..40f441e065df 100644
--- a/pkgs/tools/misc/pipelight/default.nix
+++ b/pkgs/tools/misc/pipelight/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchgit, autoconf, automake, wineStaging, perl, xlibs
+{ stdenv, fetchurl, fetchgit, autoconf, automake, wineStaging, perl, xorg
   , gnupg, gcc_multi, mesa, curl, bash, cacert, cabextract, utillinux, attr
   }:
 
@@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
     sha256 = "1i440rf22fmd2w86dlm1mpi3nb7410rfczc0yldnhgsvp5p3sm5f";
   };
 
-  buildInputs = [ wine_custom xlibs.libX11 gcc_multi mesa curl ];
+  buildInputs = [ wine_custom xorg.libX11 gcc_multi mesa curl ];
   propagatedbuildInputs = [ curl cabextract ];
 
   patches = [ ./pipelight.patch ];
diff --git a/pkgs/tools/misc/unclutter/default.nix b/pkgs/tools/misc/unclutter/default.nix
index d97ba727bae5..00f08ee07427 100644
--- a/pkgs/tools/misc/unclutter/default.nix
+++ b/pkgs/tools/misc/unclutter/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11}:
+{stdenv, fetchurl, xlibsWrapper}:
 
 stdenv.mkDerivation {
   name = "unclutter-8";
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
     sha256 = "33a78949a7dedf2e8669ae7b5b2c72067896497820292c96afaa60bb71d1f2a6";
   };
 
-  buildInputs = [x11];
+  buildInputs = [xlibsWrapper];
 
   installPhase = ''
     mkdir -pv "$out/bin"
diff --git a/pkgs/tools/misc/xclip/default.nix b/pkgs/tools/misc/xclip/default.nix
index 20d5e66cfa24..3f616fdad681 100644
--- a/pkgs/tools/misc/xclip/default.nix
+++ b/pkgs/tools/misc/xclip/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchsvn, x11, libXmu, autoconf, automake, libtool }:
+{ stdenv, fetchsvn, xlibsWrapper, libXmu, autoconf, automake, libtool }:
 
 stdenv.mkDerivation rec {
   # The last release from 2012, 0.12, lacks '-targets'
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   preConfigure = "autoreconf -vfi";
 
-  buildInputs = [ x11 libXmu autoconf automake libtool ];
+  buildInputs = [ xlibsWrapper libXmu autoconf automake libtool ];
 
   meta = { 
     description = "Tool to access the X clipboard from a console application";
diff --git a/pkgs/tools/misc/xsel/default.nix b/pkgs/tools/misc/xsel/default.nix
index 74eadaf5e2e9..3fe0f409f29b 100644
--- a/pkgs/tools/misc/xsel/default.nix
+++ b/pkgs/tools/misc/xsel/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11}:
+{stdenv, fetchurl, xlibsWrapper}:
 
 stdenv.mkDerivation {
   name = "xsel-1.2.0";
@@ -7,5 +7,5 @@ stdenv.mkDerivation {
     sha256 = "070lbcpw77j143jrbkh0y1v10ppn1jwmjf92800w7x42vh4cw9xr";
   };
 
-  buildInputs = [x11];
+  buildInputs = [xlibsWrapper];
 }
diff --git a/pkgs/tools/networking/x11-ssh-askpass/default.nix b/pkgs/tools/networking/x11-ssh-askpass/default.nix
index 5088d92a8c7f..88e7f1aec5a9 100644
--- a/pkgs/tools/networking/x11-ssh-askpass/default.nix
+++ b/pkgs/tools/networking/x11-ssh-askpass/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, x11, imake}:
+{stdenv, fetchurl, xlibsWrapper, imake}:
 
 stdenv.mkDerivation {
   name = "x11-ssh-askpass-1.2.4.1";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
 
   buildPhase = "xmkmf; make includes; make";
 
-  buildInputs = [x11 imake];
+  buildInputs = [xlibsWrapper imake];
 
   meta = {
     homepage = "http://www.jmknoble.net/software/x11-ssh-askpass/";
diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix
index aa85793be181..bd7531af18f7 100644
--- a/pkgs/tools/security/tor/torbrowser.nix
+++ b/pkgs/tools/security/tor/torbrowser.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, buildEnv
-, xlibs, alsaLib, dbus, dbus_glib, glib, gtk, atk, pango, freetype, fontconfig
+, xorg, alsaLib, dbus, dbus_glib, glib, gtk, atk, pango, freetype, fontconfig
 , gdk_pixbuf, cairo, zlib}:
 let
   bits = if stdenv.system == "x86_64-linux" then "64"
@@ -10,8 +10,8 @@ let
     name = "tor-env";
     paths = [
       stdenv.cc.cc zlib glib alsaLib dbus dbus_glib gtk atk pango freetype
-      fontconfig gdk_pixbuf cairo xlibs.libXrender xlibs.libX11 xlibs.libXext
-      xlibs.libXt
+      fontconfig gdk_pixbuf cairo xorg.libXrender xorg.libX11 xorg.libXext
+      xorg.libXt
     ];
   };
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index aed68689f7d6..e97335f20e87 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -181,17 +181,6 @@ let
   path = ../..;
 
 
-  ### Symbolic names.
-
-  x11 = xlibsWrapper;
-
-  # `xlibs' is the set of X library components.  This used to be the
-  # old modular X libraries project (called `xlibs') but now it's just
-  # the set of packages in the modular X.org tree (which also includes
-  # non-library components like the server, drivers, fonts, etc.).
-  xlibs = xorg // {xlibs = xlibsWrapper;};
-
-
   ### Helper functions.
 
   inherit lib config stdenvAdapters;
@@ -1678,7 +1667,7 @@ let
   graphviz = callPackage ../tools/graphics/graphviz { };
 
   graphviz-nox = callPackage ../tools/graphics/graphviz {
-    xlibs = null;
+    xorg = null;
     libdevil = libdevil-nox;
   };
 
@@ -3907,7 +3896,7 @@ let
     inherit zip unzip zlib boehmgc gettext pkgconfig perl;
     inherit gtk;
     inherit (gnome) libart_lgpl;
-    inherit (xlibs) libX11 libXt libSM libICE libXtst libXi libXrender
+    inherit (xorg) libX11 libXt libSM libICE libXtst libXi libXrender
       libXrandr xproto renderproto xextproto inputproto randrproto;
   });
 
@@ -8389,11 +8378,12 @@ let
 
   xercesc = callPackage ../development/libraries/xercesc {};
 
+  # Avoid using this. It isn't really a wrapper anymore, but we keep the name.
   xlibsWrapper = callPackage ../development/libraries/xlibs-wrapper {
     packages = [
-      freetype fontconfig xlibs.xproto xlibs.libX11 xlibs.libXt
-      xlibs.libXft xlibs.libXext xlibs.libSM xlibs.libICE
-      xlibs.xextproto
+      freetype fontconfig xorg.xproto xorg.libX11 xorg.libXt
+      xorg.libXft xorg.libXext xorg.libSM xorg.libICE
+      xorg.xextproto
     ];
   };
 
@@ -9263,7 +9253,7 @@ let
     mesa = mesa_noglu;
     udev = if stdenv.isLinux then udev else null;
     libdrm = if stdenv.isLinux then libdrm else null;
-  });
+  } // { inherit xlibsWrapper; } );
 
   xorgReplacements = callPackage ../servers/x11/xorg/replacements.nix { };
 
@@ -11006,7 +10996,7 @@ let
 
   emacs24 = callPackage ../applications/editors/emacs-24 {
     # use override to enable additional features
-    libXaw = xlibs.libXaw;
+    libXaw = xorg.libXaw;
     Xaw3d = null;
     gconf = null;
     alsaLib = null;
@@ -13122,7 +13112,7 @@ let
           ++ lib.optional (cfg.enableBluejeans or false) bluejeans
          );
       libs = [ gstreamer gst_plugins_base ] ++ lib.optionals (cfg.enableQuakeLive or false)
-             (with xlibs; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ])
+             (with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ])
              ++ lib.optional (enableAdobeFlash && (cfg.enableAdobeFlashDRM or false)) hal-flash
              ++ lib.optional (config.pulseaudio or false) libpulseaudio;
       gst_plugins = [ gst_plugins_base gst_plugins_good gst_plugins_bad gst_plugins_ugly gst_ffmpeg ];
@@ -14908,7 +14898,7 @@ let
   vbam = callPackage ../misc/emulators/vbam {};
 
   vice = callPackage ../misc/emulators/vice {
-    libX11 = xlibs.libX11;
+    libX11 = xorg.libX11;
     giflib = giflib_4_1;
   };
 
@@ -15074,7 +15064,9 @@ let
   rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02
   speedtest_cli = speedtest-cli;  # added 2015-02-17
   sqliteInteractive = sqlite-interactive;  # added 2014-12-06
+  xlibs = xorg; # added 2015-09
   xf86_video_nouveau = xorg.xf86videonouveau; # added 2015-09
+  x11 = xlibsWrapper; # added 2015-09
   youtube-dl = pythonPackages.youtube-dl; # added 2015-06-07
   youtubeDL = youtube-dl;  # added 2014-10-26
 
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index fdbe7f3e7bb1..83258a70df3f 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -4767,7 +4767,7 @@ let self = _self // overrides; _self = with self; {
     };
 
     buildInputs = [ pkgs.gd pkgs.libjpeg pkgs.zlib pkgs.freetype
-                    pkgs.libpng pkgs.fontconfig pkgs.xlibs.libXpm GetoptLong ];
+                    pkgs.libpng pkgs.fontconfig pkgs.xorg.libXpm GetoptLong ];
 
     # Patch needed to get arguments past the first GetOptions call
     # and to specify libfontconfig search path.
@@ -4777,7 +4777,7 @@ let self = _self // overrides; _self = with self; {
     # tests fail
     doCheck = false;
 
-    makeMakerFlags = "--lib_png_path=${pkgs.libpng} --lib_jpeg_path=${pkgs.libjpeg} --lib_zlib_path=${pkgs.zlib} --lib_ft_path=${pkgs.freetype} --lib_fontconfig_path=${pkgs.fontconfig} --lib_xpm_path=${pkgs.xlibs.libXpm}";
+    makeMakerFlags = "--lib_png_path=${pkgs.libpng} --lib_jpeg_path=${pkgs.libjpeg} --lib_zlib_path=${pkgs.zlib} --lib_ft_path=${pkgs.freetype} --lib_fontconfig_path=${pkgs.fontconfig} --lib_xpm_path=${pkgs.xorg.libXpm}";
   };
 
   GDSecurityImage = buildPerlPackage {
@@ -8376,7 +8376,7 @@ let self = _self // overrides; _self = with self; {
       sha256 = "0k2k8zg84qj1ry77i9dvmfdfpg13s6117wy5bc4nvnzv37qcvy32";
     };
 
-    buildInputs = with pkgs; [ mesa mesa_glu freeglut xlibs.libX11 xlibs.libXi xlibs.libXmu xlibs.libXext xdummy ];
+    buildInputs = with pkgs; [ mesa mesa_glu freeglut xorg.libX11 xorg.libXi xorg.libXmu xorg.libXext xdummy ];
 
     patches = [ ../development/perl-modules/perl-opengl.patch ];
 
@@ -11876,8 +11876,8 @@ let self = _self // overrides; _self = with self; {
       url = "http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/${name}.tar.gz";
       sha256 = "10fsvyr56gm59chc8b70n6bvhd3lh9c05sp8m4arcahid0rpgbwa";
     };
-    makeMakerFlags = "X11LIB=${pkgs.xlibs.libX11}/lib";
-    buildInputs = with pkgs; [ xlibs.libX11 libpng ];
+    makeMakerFlags = "X11LIB=${pkgs.xorg.libX11}/lib";
+    buildInputs = with pkgs; [ xorg.libX11 libpng ];
     configurePhase = ''
       perl Makefile.PL PREFIX=$out $makeMakerFlags
     '';
@@ -12302,9 +12302,9 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/A/AW/AWENDT/${name}.tar.gz";
       sha256 = "0j27cb9yy9ymni8cbiyxplbg086b8lv6b330nwqyx0briq3xrzfq";
     };
-    buildInputs = [ pkgs.xlibs.libXext pkgs.xlibs.libXScrnSaver pkgs.xlibs.libX11 ];
+    buildInputs = [ pkgs.xorg.libXext pkgs.xorg.libXScrnSaver pkgs.xorg.libX11 ];
     propagatedBuildInputs = [ InlineC ];
-    patchPhase = ''sed -ie 's,-L/usr/X11R6/lib/,-L${pkgs.xlibs.libX11}/lib/ -L${pkgs.xlibs.libXext}/lib/ -L${pkgs.xlibs.libXScrnSaver}/lib/,' IdleTime.pm'';
+    patchPhase = ''sed -ie 's,-L/usr/X11R6/lib/,-L${pkgs.xorg.libX11}/lib/ -L${pkgs.xorg.libXext}/lib/ -L${pkgs.xorg.libXScrnSaver}/lib/,' IdleTime.pm'';
     meta = {
       description = "Get the idle time of X11";
     };
@@ -12316,7 +12316,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/S/SM/SMCCAM/${name}.tar.gz";
       sha256 = "1dq89bh6fqv7l5mbffqcismcljpq5f869bx7g8lg698zgindv5ny";
     };
-    buildInputs = [pkgs.x11];
+    buildInputs = [pkgs.xlibsWrapper];
     NIX_CFLAGS_LINK = "-lX11";
     doCheck = false; # requires an X server
   };
@@ -12327,7 +12327,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/C/CT/CTRONDLP/${name}.tar.gz";
       sha256 = "0jznws68skdzkhgkgcgjlj40qdyh9i75r7fw8bqzy406f19xxvnw";
     };
-    buildInputs = [pkgs.x11 pkgs.xorg.libXtst pkgs.xorg.libXi];
+    buildInputs = [pkgs.xlibsWrapper pkgs.xorg.libXtst pkgs.xorg.libXi];
     NIX_CFLAGS_LINK = "-lX11 -lXext -lXtst";
     doCheck = false; # requires an X server
   };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2f31639c11ef..acd77926336b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -10405,7 +10405,7 @@ let
     buildInputs = with self; [
       pkgs.freetype pkgs.libjpeg pkgs.zlib pkgs.libtiff pkgs.libwebp pkgs.tcl nose ]
       ++ optionals (isPy26 || isPy27 || isPy33 || isPyPy) [ pkgs.lcms2 ]
-      ++ optionals (isPyPy) [ pkgs.tk pkgs.xlibs.libX11 ];
+      ++ optionals (isPyPy) [ pkgs.tk pkgs.xorg.libX11 ];
 
     # NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
     preConfigure = ''
@@ -11335,7 +11335,7 @@ let
     };
 
     patchPhase = let
-      libs = [ pkgs.mesa pkgs.xlibs.libX11 pkgs.freetype pkgs.fontconfig ];
+      libs = [ pkgs.mesa pkgs.xorg.libX11 pkgs.freetype pkgs.fontconfig ];
       paths = concatStringsSep "," (map (l: "\"${l}/lib\"") libs);
     in "sed -i -e 's|directories\.extend.*lib[^]]*|&,${paths}|' pyglet/lib.py";
 
@@ -13345,7 +13345,7 @@ let
       sha256 = "0l70pqwg88imbylcd831vg8nj8ipy4zr331f6qjccss7vn56i2h5";
     };
 
-    buildInputs = with self; [pkgs.xlibs.libX11];
+    buildInputs = with self; [pkgs.xorg.libX11];
 
     # Recompiling x_ignore_nofocus.so as the original one dlopen's libX11.so.6 by some
     # absolute paths. Replaced by relative path so it is found when used in nix.
@@ -13359,7 +13359,7 @@ let
 
     patchPhase = ''
       cp "${x_ignore_nofocus}/cpp/linux-specific/"* .
-      substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${pkgs.xlibs.libX11}/lib/libX11.so.6"
+      substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${pkgs.xorg.libX11}/lib/libX11.so.6"
       gcc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o
       gcc -shared \
         -Wl,${if stdenv.isDarwin then "-install_name" else "-soname"},x_ignore_nofocus.so \
@@ -13946,7 +13946,7 @@ let
     # error: invalid command 'test'
     doCheck = false;
 
-    propagatedBuildInputs = with self; [ pkgs.xlibs.libX11 pkgs.pythonDBus pygobject ];
+    propagatedBuildInputs = with self; [ pkgs.xorg.libX11 pkgs.pythonDBus pygobject ];
 
     meta = {
       description = "High-level, platform independent Skype API wrapper for Python";
@@ -14573,7 +14573,7 @@ let
     # I don't know why I need to add these libraries. Shouldn't they
     # be part of wxPython?
     postInstall = ''
-      libspaths=${pkgs.xlibs.libSM}/lib:${pkgs.xlibs.libXScrnSaver}/lib
+      libspaths=${pkgs.xorg.libSM}/lib:${pkgs.xorg.libXScrnSaver}/lib
       wrapProgram $out/bin/taskcoach.py \
         --prefix LD_LIBRARY_PATH : $libspaths
     '';
@@ -15716,7 +15716,7 @@ let
     # Tests require `pyutil' so disable them to avoid circular references.
     doCheck = false;
 
-    propagatedBuildInputs = with self; [ pkgs.xlibs.libX11 ];
+    propagatedBuildInputs = with self; [ pkgs.xorg.libX11 ];
 
     meta = {
       description = "Fully functional X client library for Python programs";