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

85 lines
2.1 KiB
Nix
Raw Normal View History

2021-03-10 12:36:44 +00:00
{ lib
, buildPythonApplication
, fetchPypi
, jellyfin-apiclient-python
, jinja2
, mpv
, pillow
, pystray
, python-mpv-jsonipc
, pywebview
, tkinter
}:
2020-03-05 09:26:01 +00:00
buildPythonApplication rec {
pname = "jellyfin-mpv-shim";
2021-04-22 08:04:01 +01:00
version = "2.0.1";
2020-03-05 09:26:01 +00:00
src = fetchPypi {
inherit pname version;
2021-04-22 08:04:01 +01:00
sha256 = "sha256-NXDLqQzCUfDPoKNPrmIn5FMedMKYxtDhkawRE2lg/vI=";
2020-03-05 09:26:01 +00:00
};
2021-03-10 12:36:44 +00:00
propagatedBuildInputs = [
jellyfin-apiclient-python
mpv
pillow
python-mpv-jsonipc
# gui dependencies
pystray
tkinter
# display_mirror dependencies
jinja2
pywebview
2020-08-04 11:41:13 +01:00
];
2020-03-05 09:26:01 +00: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
'';
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"
'';
2021-01-04 02:27:23 +00:00
# no tests
doCheck = false;
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
meta = with lib; {
2021-04-20 07:40:29 +01:00
homepage = "https://github.com/jellyfin/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";
2021-04-20 07:40:29 +01:00
longDescription = ''
Jellyfin MPV Shim is a client for the Jellyfin media server which plays media in the
MPV media player. The application runs in the background and opens MPV only
when media is cast to the player. The player supports most file formats, allowing you
to prevent needless transcoding of your media files on the server. The player also has
advanced features, such as bulk subtitle updates and launching commands on events.
'';
license = with licenses; [
# jellyfin-mpv-shim
gpl3Only
mit
# shader-pack licenses (github:iwalton3/default-shader-pack)
# KrigBilateral, SSimDownscaler, NNEDI3
gpl3Plus
# Anime4K, FSRCNNX
mit
# Static Grain
unlicense
];
2020-03-05 09:26:01 +00:00
maintainers = with maintainers; [ jojosch ];
};
}