Change:
A in the xwayland package output causes nixos-rebuild to fail due to permission issues, since /var/tmp contains private directories (mode 700) System: NixOS 16.09 Nix version: 1.11.4 Nixpkgs version: 16.09.901.
Essentially the same problem as in vanilla X server:
found some more info on the problem the issue, is that both wayland and xorg have the same "fix" for packages wanting to write to the store, at the same place /nix/store/dd65ni8yzibvq2aj5jdylnv557i3hcd1-xwayland-1.18.4/share/X11/xkb/compiled and /nix/store/v82zrx8dnm5j8lq4a2fc5g0rcx2jx04k-xorg-server-1.18.4/share/X11/xkb/compiled are "conflicting" so buildEnv tries to cd into both, find every file within, and then create a compiled directory with symlinks to merge the 2 except, both versions of compiled are symlinks to /var/tmp in this case, there is no need to merge the contents of "compiled" since its 2 identical symlinks that are conflicting, so id say buildEnv should be patched and i have a simple testcase:
I'm guessing that this works OK when built in a sandbox?
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . on the on .
As both the referenced packages build now, I guess it's safe to close this.

Discussion:
{ stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon, cairo, libxcb , libXcursor, x11, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput , pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null <del> , libwebp ? null </del> <ins> , libwebp ? null, xwayland ? null </ins> }: let version = "1.6.0"; in

]; configureFlags = [ <del> "--enable-xwayland" </del> "--enable-x11-compositor" "--enable-drm-compositor" "--enable-wayland-compositor"

"--enable-weston-launch" "--disable-setuid-install" # prevent install target to chown root weston-launch, which fails ] ++ stdenv.lib.optional (freerdp != null) "--enable-rdp-compositor" <del> ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder"; </del> <ins> ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder" ++ stdenv.lib.optional (xwayland != null) ( "--enable-xwayland " + "--with-xserver-path=${xwayland}/bin/Xwayland"); </ins> meta = with stdenv.lib; { description = "Reference implementation of a Wayland compositor";

<ins> { stdenv, wayland, xorgserver, xkbcomp, xkeyboard_config, epoxy, libxslt, libunwind, makeWrapper } : with stdenv.lib; overrideDerivation xorgserver (oldAttrs: { name = "xwayland-${xorgserver.version}"; propagatedNativeBuildInputs = oldAttrs.propagatedNativeBuildInputs ++ [wayland epoxy libxslt makeWrapper libunwind]; configureFlags = [ "--disable-docs" "--disable-devel-docs" "--enable-xwayland" "--disable-xorg" "--disable-xvfb" "--disable-xnest" "--disable-xquartz" "--disable-xwin" "--with-default-font-path=" "--with-xkb-bin-directory=${xkbcomp}/bin" "--with-xkb-path=${xkeyboard_config}/etc/X11/xkb" "--with-xkb-output=$out/share/X11/xkb/compiled" ]; postInstall = '' rm -fr $out/share/X11/xkb/compiled ln -s /var/tmp $out/share/X11/xkb/compiled ''; }) // { meta = { description = "An X server for interfacing X11 apps with the Wayland protocol"; homepage = http://wayland.freedesktop.org/xserver.html; license = licenses.mit; platforms = platforms.linux; }; } </ins>

xorgVideoUnichrome = callPackage ../servers/x11/xorg/unichrome/default.nix { }; <ins> xwayland = with xorg; callPackage ../servers/x11/xorg/xwayland.nix { }; </ins> yaws = callPackage ../servers/http/yaws { }; zabbix = recurseIntoAttrs (import ../servers/monitoring/zabbix {

vaapi = null; libva = null; libwebp = null; <ins> xwayland = null; </ins> }; weston = callPackage ../applications/window-managers/weston {