2021-03-10 12:40:30 +01:00
|
|
|
{ lib, buildPythonApplication, fetchPypi
|
2020-03-05 10:26:01 +01:00
|
|
|
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
|
|
|
|
, pillow, tkinter, pystray, jinja2, pywebview }:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "jellyfin-mpv-shim";
|
2020-08-04 12:41:13 +02:00
|
|
|
version = "1.7.1";
|
2020-03-05 10:26:01 +01:00
|
|
|
|
2021-03-10 12:40:30 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-Fo1auMiYUgJrJGJII+FfHspcke0r/VSSXzGwVNIHtEE=";
|
2020-03-05 10:26:01 +01:00
|
|
|
};
|
|
|
|
|
2020-08-04 12:41:13 +02:00
|
|
|
patches = [
|
|
|
|
./disable-desktop-client.patch
|
|
|
|
];
|
|
|
|
|
2020-03-05 10:26:01 +01:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2021-03-10 12:41:09 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace jellyfin_mpv_shim/conf.py \
|
|
|
|
--replace "check_updates: bool = True" "check_updates: bool = False" \
|
|
|
|
--replace "notify_updates: bool = True" "notify_updates: bool = False"
|
|
|
|
'';
|
|
|
|
|
2020-03-05 10:26:01 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jellyfin-apiclient-python
|
|
|
|
mpv
|
|
|
|
pillow
|
|
|
|
python-mpv-jsonipc
|
|
|
|
|
|
|
|
# gui dependencies
|
|
|
|
pystray
|
|
|
|
tkinter
|
|
|
|
|
|
|
|
# display_mirror dependencies
|
|
|
|
jinja2
|
|
|
|
pywebview
|
|
|
|
];
|
|
|
|
|
2021-01-04 03:27:23 +01:00
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-03-05 10:26:01 +01:00
|
|
|
homepage = "https://github.com/iwalton3/jellyfin-mpv-shim";
|
2020-07-01 13:12:56 +02:00
|
|
|
description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
|
2020-03-05 10:26:01 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ jojosch ];
|
|
|
|
};
|
|
|
|
}
|