3 buildPythonApplication,
7 jellyfin-apiclient-python,
20 buildPythonApplication rec {
21 pname = "jellyfin-mpv-shim";
25 inherit pname version;
26 hash = "sha256-EANaNmvD8hcdGB2aoGemKvA9syS1VvIqGsP1jk0b+lE=";
35 propagatedBuildInputs = [
36 jellyfin-apiclient-python
45 # display_mirror dependencies
50 # override $HOME directory:
51 # error: [Errno 13] Permission denied: '/homeless-shelter'
53 # remove jellyfin_mpv_shim/win_utils.py:
54 # ModuleNotFoundError: No module named 'win32gui'
58 rm jellyfin_mpv_shim/win_utils.py
62 substituteInPlace jellyfin_mpv_shim/conf.py \
63 --replace "check_updates: bool = True" "check_updates: bool = False" \
64 --replace "notify_updates: bool = True" "notify_updates: bool = False"
65 # python-mpv renamed to mpv with 1.0.4
66 substituteInPlace setup.py \
67 --replace "python-mpv" "mpv" \
68 --replace "mpv-jsonipc" "python_mpv_jsonipc"
71 # Install all the icons for the desktop item
73 for s in 16 32 48 64 128 256; do
74 mkdir -p $out/share/icons/hicolor/''${s}x''${s}/apps
75 ln -s $out/${python.sitePackages}/jellyfin_mpv_shim/integration/jellyfin-''${s}.png \
76 $out/share/icons/hicolor/''${s}x''${s}/apps/${pname}.png
80 # needed for pystray to access appindicator using GI
82 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
88 pythonImportsCheck = [ "jellyfin_mpv_shim" ];
95 desktopName = "Jellyfin MPV Shim";
106 homepage = "https://github.com/jellyfin/jellyfin-mpv-shim";
107 description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
109 Jellyfin MPV Shim is a client for the Jellyfin media server which plays media in the
110 MPV media player. The application runs in the background and opens MPV only
111 when media is cast to the player. The player supports most file formats, allowing you
112 to prevent needless transcoding of your media files on the server. The player also has
113 advanced features, such as bulk subtitle updates and launching commands on events.
115 license = with licenses; [
120 # shader-pack licenses (github:iwalton3/default-shader-pack)
121 # KrigBilateral, SSimDownscaler, NNEDI3
128 maintainers = with maintainers; [ jojosch ];
129 mainProgram = "jellyfin-mpv-shim";