1 { lib, buildPythonApplication, fetchFromGitHub, fetchpatch, python, mpv, requests, python-mpv-jsonipc, pystray, tkinter
2 , wrapGAppsHook3, gobject-introspection, mpv-shim-default-shaders }:
4 buildPythonApplication rec {
5 pname = "plex-mpv-shim";
8 src = fetchFromGitHub {
11 rev = "refs/tags/v${version}";
12 sha256 = "sha256-hUGKOJEDZMK5uhHoevFt1ay6QQEcoN4F8cPxln5uMRo=";
16 # pull in upstream commit to fix python-mpv dependency name -- remove when version > 1.11.0
18 url = "https://github.com/iwalton3/plex-mpv-shim/commit/d8643123a8ec79216e02850b08f63b06e4e0a2ea.diff";
19 hash = "sha256-nc+vwYnAtMjVzL2fIQeTAqhf3HBseL+2pFEtv8zNUXo=";
28 propagatedBuildInputs = [ mpv requests python-mpv-jsonipc pystray tkinter ];
30 # needed for pystray to access appindicator using GI
32 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
37 # put link to shaders where upstream package expects them
38 ln -s ${mpv-shim-default-shaders}/share/mpv-shim-default-shaders $out/${python.sitePackages}/plex_mpv_shim/default_shader_pack
41 # does not contain tests
45 homepage = "https://github.com/iwalton3/plex-mpv-shim";
46 description = "Allows casting of videos to MPV via the Plex mobile and web app";
47 maintainers = with maintainers; [ devusb ];
48 license = licenses.mit;
49 platforms = platforms.linux;
50 mainProgram = "plex-mpv-shim";