anchor.diff:  , useWayland ? false, wayland ? null, wayland-protocols ? null
   , waylandpp ?  null, libxkbcommon ? null
   , useGbm ? false, mesa ? null, libinput ? null
  +, buildPackages
   }:
   
   assert dbusSupport  -> dbus != null;
  
positive.code:     ++ lib.optional  usbSupport      libusb
      ++ lib.optional  vdpauSupport    libvdpau
      ++ lib.optionals useWayland [
        wayland waylandpp
        # Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise
        libxkbcommon.dev
      ]
  
negative.code:       "-DENABLE_EVENTCLIENTS=ON"
        "-DENABLE_INTERNAL_CROSSGUID=OFF"
        "-DENABLE_OPTICAL=ON"
        "-DLIRC_DEVICE=/run/lirc/lircd"
        "-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig"
        "-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc"
        "-DPYTHON_EXECUTABLE=${buildPackages.python2Packages.python}/bin/python"
      ] ++ lib.optional useWayland [
        "-DCORE_PLATFORM_NAME=wayland"
        "-DWAYLAND_RENDER_SYSTEM=gl"
        "-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++"
      ] ++ lib.optional useGbm [
        "-DCORE_PLATFORM_NAME=gbm"
        "-DGBM_RENDER_SYSTEM=gles"
  