anchor.diff:      sha256 = "e7179b2054163652596a56301c9f025515cb08c6d6310b42b897c3ad11c0199b";
     };
   in stdenv.mkDerivation rec {
  +    version = kodi_version;
       name = "kodi-${version}";
  -    version = "17.3";
   
       src = fetchurl {
         url = "https://github.com/xbmc/xbmc/archive/${version}-${rel}.tar.gz";
  -      sha256 = "189isc1jagrnq549vwpvb0x1w6p0mkjwv7phm8dzvki96wx6bs0x";
  +      sha256 = "1p1lxkapynjbd85ns7m4jybl4k35kxzv7105xkh03hlz8kkqc23b";
       };
   
       buildInputs = [
  
positive.code: assert rtmpSupport  -> rtmpdump != null;
  
  let
    rel = "Krypton";
    ffmpeg_3_1_6 = fetchurl {
      url = "https://github.com/xbmc/FFmpeg/archive/3.1.6-${rel}.tar.gz";
      sha256 = "14jicb26s20nr3qmfpazszpc892yjwjn81zbsb8szy3a5xs19y81";
    };
    # Usage of kodi fork of libdvdnav and libdvdread is necessary for functional dvd playback:
    libdvdnav_src = fetchurl {
  
negative.code:         --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
        substituteInPlace tools/depends/target/ffmpeg/autobuild.sh \
          --replace "/bin/bash" "${bash}/bin/bash -ex"
        cp ${ffmpeg_3_1_9} tools/depends/target/ffmpeg/ffmpeg-3.1.9-${rel}-${version}.tar.gz
        ln -s ${libdvdcss.src} tools/depends/target/libdvdcss/libdvdcss-master.tar.gz
        cp ${libdvdnav_src} tools/depends/target/libdvdnav/libdvdnav-master.tar.gz
        cp ${libdvdread_src} tools/depends/target/libdvdread/libdvdread-master.tar.gz
  