9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{ lib, buildPythonApplication, fetchFromGitHub, python, mpv, requests, python-mpv-jsonipc, pystray, tkinter
|
|
, wrapGAppsHook, gobject-introspection, mpv-shim-default-shaders }:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "plex-mpv-shim";
|
|
version = "1.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "iwalton3";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-hUGKOJEDZMK5uhHoevFt1ay6QQEcoN4F8cPxln5uMRo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook
|
|
gobject-introspection
|
|
];
|
|
|
|
propagatedBuildInputs = [ mpv requests python-mpv-jsonipc pystray tkinter ];
|
|
|
|
# needed for pystray to access appindicator using GI
|
|
preFixup = ''
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
'';
|
|
dontWrapGApps = true;
|
|
|
|
postInstall = ''
|
|
# put link to shaders where upstream package expects them
|
|
ln -s ${mpv-shim-default-shaders}/share/mpv-shim-default-shaders $out/${python.sitePackages}/plex_mpv_shim/default_shader_pack
|
|
'';
|
|
|
|
# does not contain tests
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/iwalton3/plex-mpv-shim";
|
|
description = "Allows casting of videos to MPV via the Plex mobile and web app";
|
|
maintainers = with maintainers; [ devusb ];
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|