diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-03-25 11:28:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 11:28:53 +0100 |
commit | a65965b9e3ca868be1c4e99a463604313008841c (patch) | |
tree | 7a7f27011e774210fbcc1116f2597964bb70bc6d /pkgs/applications | |
parent | 499600b06d33008758e75b3c2e5849bac2791968 (diff) | |
parent | c9bde8e5f74724eb1421981454b98467b6fbf7a3 (diff) |
Merge pull request #115767 from jojosch/jellyfin-mpv-shim-1.8.1
Diffstat (limited to 'pkgs/applications')
4 files changed, 71 insertions, 84 deletions
diff --git a/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/pkgs/applications/video/jellyfin-mpv-shim/default.nix index 6dc42a47685b..f90421cab914 100644 --- a/pkgs/applications/video/jellyfin-mpv-shim/default.nix +++ b/pkgs/applications/video/jellyfin-mpv-shim/default.nix @@ -1,25 +1,68 @@ -{ lib, buildPythonApplication, fetchFromGitHub, callPackage -, mpv, python-mpv-jsonipc, jellyfin-apiclient-python -, pillow, tkinter, pystray, jinja2, pywebview }: +{ lib +, buildPythonApplication +, copyDesktopItems +, fetchPypi +, makeDesktopItem +, flask +, jellyfin-apiclient-python +, jinja2 +, mpv +, pillow +, pydantic +, pyqtwebengine +, pystray +, python-mpv-jsonipc +, pywebview +, qt5 +, tkinter +, werkzeug +}: -let - shaderPack = callPackage ./shader-pack.nix {}; -in buildPythonApplication rec { pname = "jellyfin-mpv-shim"; - version = "1.7.1"; + version = "1.10.1"; - src = fetchFromGitHub { - owner = "iwalton3"; - repo = pname; - rev = "v${version}"; - sha256 = "0alrh5h3f8pq9mrq09jmpqa0yslxsjqwij6kwn24ggbwc10zkq75"; - fetchSubmodules = true; # needed for display_mirror css file + src = fetchPypi { + inherit pname version; + sha256 = "sha256-bcTCp2K1zRgobBAi7A62VPogM6km+DixRERWEOm9Yu4="; }; - patches = [ - ./disable-desktop-client.patch - ./disable-update-check.patch + propagatedBuildInputs = [ + jellyfin-apiclient-python + mpv + pillow + pydantic + python-mpv-jsonipc + + # gui dependencies + pystray + tkinter + + # display_mirror dependencies + jinja2 + pywebview + + # desktop dependencies + flask + pyqtwebengine + werkzeug + ]; + + nativeBuildInputs = [ + copyDesktopItems + qt5.wrapQtAppsHook + ]; + + desktopItems = [ + (makeDesktopItem { + name = "Jellyfin Desktop"; + exec = "jellyfin-desktop"; + icon = "jellyfin-desktop"; + desktopName = "jellyfin-desktop"; + comment = "MPV-based desktop and cast client for Jellyfin"; + genericName = "MPV-based desktop and cast client for Jellyfin"; + categories = "Video;AudioVideo;TV;Player"; + }) ]; # override $HOME directory: @@ -34,31 +77,27 @@ buildPythonApplication rec { ''; postPatch = '' - # link the default shader pack - ln -s ${shaderPack} jellyfin_mpv_shim/default_shader_pack + substituteInPlace jellyfin_mpv_shim/conf.py \ + --replace "check_updates: bool = True" "check_updates: bool = False" \ + --replace "notify_updates: bool = True" "notify_updates: bool = False" ''; - propagatedBuildInputs = [ - jellyfin-apiclient-python - mpv - pillow - python-mpv-jsonipc - - # gui dependencies - pystray - tkinter + postInstall = '' + mkdir -p $out/share/pixmaps + cp jellyfin_mpv_shim/integration/jellyfin-256.png $out/share/pixmaps/jellyfin-desktop.png + ''; - # display_mirror dependencies - jinja2 - pywebview - ]; + postFixup = '' + wrapQtApp $out/bin/jellyfin-desktop + wrapQtApp $out/bin/jellyfin-mpv-desktop + ''; # no tests doCheck = false; pythonImportsCheck = [ "jellyfin_mpv_shim" ]; meta = with lib; { - homepage = "https://github.com/iwalton3/jellyfin-mpv-shim"; + homepage = "https://github.com/jellyfin/jellyfin-desktop"; description = "Allows casting of videos to MPV via the jellyfin mobile and web app"; license = licenses.gpl3; maintainers = with maintainers; [ jojosch ]; diff --git a/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch b/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch deleted file mode 100644 index 996225efb3a5..000000000000 --- a/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index a831959..2206e6e 100644 ---- a/setup.py -+++ b/setup.py -@@ -25,7 +25,6 @@ setup( - entry_points={ - 'console_scripts': [ - 'jellyfin-mpv-shim=jellyfin_mpv_shim.mpv_shim:main', -- 'jellyfin-mpv-desktop=jellyfin_mpv_shim.mpv_shim:main_desktop', - ] - }, - classifiers=[ diff --git a/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch b/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch deleted file mode 100644 index 6941b956e854..000000000000 --- a/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/jellyfin_mpv_shim/conf.py b/jellyfin_mpv_shim/conf.py -index 0ab9326..ccedc17 100644 ---- a/jellyfin_mpv_shim/conf.py -+++ b/jellyfin_mpv_shim/conf.py -@@ -88,8 +88,8 @@ class Settings(object): - "sync_revert_seek": True, - "sync_osd_message": True, - "screenshot_menu": True, -- "check_updates": True, -- "notify_updates": True, -+ "check_updates": False, -+ "notify_updates": False, - "lang": None, - "desktop_scale": 1.0, - } diff --git a/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix b/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix deleted file mode 100644 index 89a601af4add..000000000000 --- a/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - pname = "jellyfin-mpv-shim-shader-pack"; - version = "1.0.0"; - - src = fetchFromGitHub { - owner = "iwalton3"; - repo = "default-shader-pack"; - rev = "v${version}"; - sha256 = "04y8gvjy4v3773b1kyan4dxqcf86b56x7v33m2k246jbn0rl2pgr"; - }; - - installPhase = '' - mkdir -p $out - cp -a . $out - ''; - - meta = with lib; { - homepage = "https://github.com/iwalton3/default-shader-pack"; - description = "Preconfigured set of MPV shaders and configurations for MPV Shim media clients"; - license = with licenses; [ mit lgpl3Plus unlicense ]; - maintainers = with maintainers; [ jojosch ]; - }; -} |