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:       which
        pkgconfig gnumake
        autoconf automake libtool # still needed for some components. Check if that is the case with 19.0
      ] ++ lib.optionals useWayland [ wayland-protocols ];
  
      cmakeFlags = [
        "-Dlibdvdcss_URL=${libdvdcss.src}"
  
negative.code: 
      buildInputs = [
        gnutls libidn libtasn1 nasm p11-kit
        libxml2 python2Packages.python
        boost libmicrohttpd
        gettext pcre-cpp yajl fribidi libva libdrm
        openssl gperf tinyxml2 taglib libssh
        alsaLib libGL libGLU fontconfig freetype ftgl
        libjpeg libpng libtiff
        libmpeg2 libsamplerate libmad
        libogg libvorbis flac libxslt systemd
        lzo libcdio libmodplug libass libbluray
        sqlite libmysqlclient avahi lame
        curl bzip2 zip unzip glxinfo
        libcec libcec_platform dcadec libuuid
        libgcrypt libgpgerror libunistring
        libcrossguid libplist
        bluez giflib glib harfbuzz lcms2 libpthreadstubs
        ffmpeg flatbuffers fmt fstrcmp rapidjson
        lirc
        # libdvdcss libdvdnav libdvdread
      ]
      ++ lib.optional x11Support [
        libX11 xorgproto libXt libXmu libXext libXdmcp
        libXinerama libXrandr libXtst libXfixes
      ]
      ++ lib.optional  dbusSupport     dbus
      ++ lib.optional joystickSupport cwiid
      ++ lib.optional  nfsSupport      libnfs
      ++ lib.optional  pulseSupport    libpulseaudio
      ++ lib.optional  rtmpSupport     rtmpdump
  