3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix

56 lines
1.4 KiB
Nix
Raw Normal View History

2020-03-05 09:26:01 +00:00
{ stdenv, buildPythonApplication, fetchFromGitHub, fetchurl
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
, pillow, tkinter, pystray, jinja2, pywebview }:
buildPythonApplication rec {
pname = "jellyfin-mpv-shim";
2020-07-01 12:12:56 +01:00
version = "1.5.11";
2020-03-05 09:26:01 +00:00
src = fetchFromGitHub {
owner = "iwalton3";
repo = pname;
rev = "v${version}";
2020-07-01 12:12:56 +01:00
sha256 = "14hm8yccdp7w1vdnvdzafk1byhaq1qsr33i4962s1nvm9lafxkr7";
2020-03-05 09:26:01 +00:00
fetchSubmodules = true; # needed for display_mirror css file
};
# override $HOME directory:
# error: [Errno 13] Permission denied: '/homeless-shelter'
#
# remove jellyfin_mpv_shim/win_utils.py:
# ModuleNotFoundError: No module named 'win32gui'
preCheck = ''
export HOME=$TMPDIR
rm jellyfin_mpv_shim/win_utils.py
'';
2020-07-01 12:12:56 +01:00
# disable the desktop client for now
postPatch = ''
substituteInPlace setup.py \
--replace "'jellyfin-mpv-desktop=jellyfin_mpv_shim.mpv_shim:main_desktop'," ""
'';
2020-03-05 09:26:01 +00:00
propagatedBuildInputs = [
jellyfin-apiclient-python
mpv
pillow
python-mpv-jsonipc
# gui dependencies
pystray
tkinter
# display_mirror dependencies
jinja2
pywebview
];
meta = with stdenv.lib; {
homepage = "https://github.com/iwalton3/jellyfin-mpv-shim";
2020-07-01 12:12:56 +01:00
description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
2020-03-05 09:26:01 +00:00
license = licenses.gpl3;
maintainers = with maintainers; [ jojosch ];
};
}