anchor.diff:  { lib
   , buildPythonApplication
  -, copyDesktopItems
   , fetchPypi
  -, makeDesktopItem
  -, flask
   , jellyfin-apiclient-python
   , jinja2
   , mpv
   , pillow
   , pydantic
  -, pyqtwebengine
   , pystray
   , python-mpv-jsonipc
   , pywebview
  -, qt5
   , tkinter
  -, werkzeug
   }:
   
   buildPythonApplication rec {
     pname = "jellyfin-mpv-shim";
  -  version = "1.10.4";
  +  version = "2.0.0";
   
     src = fetchPypi {
       inherit pname version;
  -    sha256 = "sha256-QMyb69S8Ln4X0oUuLpL6vtgxJwq8f+Q4ReNckrN4E+E=";
  +    sha256 = "sha256-YAZnNSzgAGYSb45VINRCPeUUbbtuOp/bLbIqz/90W6g=";
     };
   
     propagatedBuildInputs = [
  
positive.code:     # display_mirror dependencies
      jinja2
      pywebview
  
      # desktop dependencies
      flask
      pyqtwebengine
      werkzeug
    ];
  
    nativeBuildInputs = [
      copyDesktopItems
      qt5.wrapQtAppsHook
    ];
  
    desktopItems = [
      (makeDesktopItem {
        name = "Jellyfin Desktop";
        exec = "jellyfin-desktop";
        icon = "jellyfin-desktop";
        desktopName = "jellyfin-desktop";
        comment = "MPV-based desktop and cast client for Jellyfin";
        genericName = "MPV-based desktop and cast client for Jellyfin";
        categories = "Video;AudioVideo;TV;Player";
      })
    ];
  
    # override $HOME directory:
  
negative.code:       --replace "notify_updates: bool = True" "notify_updates: bool = False"
    '';
  
    # no tests
    doCheck = false;
    pythonImportsCheck = [ "jellyfin_mpv_shim" ];
  
    meta = with lib; {
      homepage = "https://github.com/jellyfin/jellyfin-mpv-shim";
      description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
      longDescription = ''
        Jellyfin MPV Shim is a client for the Jellyfin media server which plays media in the
        MPV media player. The application runs in the background and opens MPV only
        when media is cast to the player. The player supports most file formats, allowing you
        to prevent needless transcoding of your media files on the server. The player also has
        advanced features, such as bulk subtitle updates and launching commands on events.
      '';
      license = with licenses; [
        # jellyfin-mpv-shim
        gpl3Only
        mit
  
        # shader-pack licenses (github:iwalton3/default-shader-pack)
        # KrigBilateral, SSimDownscaler, NNEDI3
        gpl3Plus
        # Anime4K, FSRCNNX
        mit
        # Static Grain
        unlicense
      ];
      maintainers = with maintainers; [ jojosch ];
    };
  }
  