anchor.diff:      ++ optional archiveSupport     libarchive
       ++ optionals dvdnavSupport     [ libdvdnav libdvdnav.libdvdread ]
       ++ optionals x11Support        [ libX11 libXext libGLU_combined libXxf86vm ]
  -    ++ optionals waylandSupport    [ wayland libxkbcommon ]
  +    ++ optionals waylandSupport    [ wayland wayland-protocols libxkbcommon ]
       ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
         libiconv Cocoa CoreAudio
       ]);
  
positive.code:   available = x: x != null;
  in
  assert x11Support         -> all available [libGLU_combined libX11 libXext libXxf86vm];
  assert waylandSupport     -> all available [wayland libxkbcommon];
  assert rubberbandSupport  -> available rubberband;
  assert xineramaSupport    -> x11Support && available libXinerama;
  assert xvSupport          -> x11Support && available libXv;
  
negative.code:     libXext    ? null,
      libXxf86vm ? null
  
  , waylandSupport ? false
    , wayland           ? null
    , wayland-protocols ? null
    , libxkbcommon      ? null
  
  , rubberbandSupport  ? true,  rubberband    ? null
  , xineramaSupport    ? true,  libXinerama   ? null
  