nixpkgs/pkgs/applications/video/plex-mpv-shim/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.6 KiB
Nix
Raw Permalink Normal View History

{ lib, buildPythonApplication, fetchFromGitHub, fetchpatch, python, mpv, requests, python-mpv-jsonipc, pystray, tkinter
, wrapGAppsHook3, gobject-introspection, mpv-shim-default-shaders }:
2020-02-27 00:36:48 +00:00
buildPythonApplication rec {
pname = "plex-mpv-shim";
2023-02-17 14:43:55 +00:00
version = "1.11.0";
2020-02-27 00:36:48 +00:00
src = fetchFromGitHub {
owner = "iwalton3";
repo = pname;
2023-02-17 14:43:55 +00:00
rev = "refs/tags/v${version}";
sha256 = "sha256-hUGKOJEDZMK5uhHoevFt1ay6QQEcoN4F8cPxln5uMRo=";
2020-02-27 00:36:48 +00:00
};
patches = [
# pull in upstream commit to fix python-mpv dependency name -- remove when version > 1.11.0
(fetchpatch {
url = "https://github.com/iwalton3/plex-mpv-shim/commit/d8643123a8ec79216e02850b08f63b06e4e0a2ea.diff";
hash = "sha256-nc+vwYnAtMjVzL2fIQeTAqhf3HBseL+2pFEtv8zNUXo=";
})
];
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
2022-01-20 19:00:00 +00:00
propagatedBuildInputs = [ mpv requests python-mpv-jsonipc pystray tkinter ];
2020-02-27 00:36:48 +00:00
# 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
'';
2021-01-03 23:07:09 +00:00
# does not contain tests
doCheck = false;
meta = with lib; {
2020-02-27 00:36:48 +00:00
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 ];
2020-02-27 00:36:48 +00:00
license = licenses.mit;
platforms = platforms.linux;
2023-11-27 01:17:53 +00:00
mainProgram = "plex-mpv-shim";
2020-02-27 00:36:48 +00:00
};
}