anchor.diff:      ++ lib.optional  usbSupport      libusb
       ++ lib.optional  vdpauSupport    libvdpau
       ++ lib.optionals useWayland [
  -      wayland waylandpp
  +      wayland waylandpp wayland-protocols
         # Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise
         libxkbcommon.dev
       ]
  
positive.code:     # I'm guessing there is a thing waiting to time out
      doCheck = false;
  
      postPatch = ''
        substituteInPlace xbmc/platform/linux/LinuxTimezone.cpp \
          --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
  
negative.code:     sha256  = "1krsjlr949iy5l6ljxancza1yi6w1annxc5s6k283i9mb15qy8cy";
      preConfigure = ''
        cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} .
        sed -i 's/ --cpu=''${CPU}//' CMakeLists.txt
        sed -i 's/--strip=''${CMAKE_STRIP}/--strip=''${CMAKE_STRIP} --ranlib=''${CMAKE_RANLIB}/' CMakeLists.txt
      '';
      cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
        "-DCROSSCOMPILING=ON"
        "-DCPU=${stdenv.hostPlatform.parsed.cpu.name}"
        "-DOS=${stdenv.hostPlatform.parsed.kernel.name}"
        "-DPKG_CONFIG_EXECUTABLE=pkgconfig"
      ];
      buildInputs = [ libidn libtasn1 p11-kit zlib libva ]
        ++ lib.optional  vdpauSupport    libvdpau;
      nativeBuildInputs = [ cmake nasm pkgconfig gnutls ];
    };
  
    # We can build these externally but FindLibDvd.cmake forces us to build it
  