NixOS/nixpkgs — pull request #3101 by cstrahan (2014-06-26 20:07:41+00:00)
Title: [DON'T MERGE] Use XQuartz on Darwin

I'm opening this ticket to track my work on getting XQuartz into Nixpkgs for X11 on Darwin.

As of writing this, this branch is incredibly chopped up and unstable. I'd would suggest waiting for me to give the thumbs up here before diving in and trying to make any sense of it.

Some notes:

* [The XQuartz repo](http://cgit.freedesktop.org/~jeremyhu/xserver/)
* [XQuartz build instructions](http://xquartz.macosforge.org/trac/wiki/DeveloperInfo)
* [The MacPorts Portfile](https://trac.macports.org/browser/trunk/dports/x11/xorg-server/Portfile)
* The XQuartz project bundles both `xorgserver` (`X`, `Xvfb`, `Xnest`, `Xephyr`, `Xfake`, etc) and the `XQuartz.app` in the same source tree. They must be compiled separately (the `--disable-xquartz --enable-xvfb --enable-xnest --enable-kdrive` configure flags mentioned in the build instructions)
* `xorgserver` (sans `XQuartz.app`) builds fine with `stdenv` (haven't tested that it functions properly yet), while the `XQuartz.app` will only build with `clangStdenv`
* With some minor patches (replacing `clock_gettime`) in `libdrm`, all of `xorgserver`'s dependencies build as-is