diff options
author | Johannes Schleifenbaum <johannes@js-webcoding.de> | 2021-03-10 13:36:44 +0100 |
---|---|---|
committer | Johannes Schleifenbaum <johannes@js-webcoding.de> | 2021-03-10 20:34:20 +0100 |
commit | 36061c564e21099d1d9c164e58334d8beb2b6a76 (patch) | |
tree | d99184c83229821a6b2830639f00ed3dcf6b9ee3 /pkgs/applications/video/jellyfin-mpv-shim | |
parent | 4392bac9971a2af238fb547e96a89161da21cdfc (diff) |
jellyfin-mpv-shim: enable desktop
Diffstat (limited to 'pkgs/applications/video/jellyfin-mpv-shim')
-rw-r--r-- | pkgs/applications/video/jellyfin-mpv-shim/default.nix | 78 | ||||
-rw-r--r-- | pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch | 12 |
2 files changed, 60 insertions, 30 deletions
diff --git a/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/pkgs/applications/video/jellyfin-mpv-shim/default.nix index e25f74c2dc97c..121cd5d3017d2 100644 --- a/pkgs/applications/video/jellyfin-mpv-shim/default.nix +++ b/pkgs/applications/video/jellyfin-mpv-shim/default.nix @@ -1,6 +1,21 @@ -{ lib, buildPythonApplication, fetchPypi -, mpv, python-mpv-jsonipc, jellyfin-apiclient-python -, pillow, tkinter, pystray, jinja2, pywebview }: +{ lib +, buildPythonApplication +, copyDesktopItems +, fetchPypi +, makeDesktopItem +, flask +, jellyfin-apiclient-python +, jinja2 +, mpv +, pillow +, pyqtwebengine +, pystray +, python-mpv-jsonipc +, pywebview +, qt5 +, tkinter +, werkzeug +}: buildPythonApplication rec { pname = "jellyfin-mpv-shim"; @@ -11,8 +26,41 @@ buildPythonApplication rec { sha256 = "sha256-Fo1auMiYUgJrJGJII+FfHspcke0r/VSSXzGwVNIHtEE="; }; - patches = [ - ./disable-desktop-client.patch + propagatedBuildInputs = [ + jellyfin-apiclient-python + mpv + pillow + 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 MPV Shim Desktop"; + exec = "jellyfin-mpv-desktop"; + icon = "jellyfin-mpv-desktop"; + desktopName = "jellyfin-mpv-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: @@ -32,20 +80,14 @@ buildPythonApplication rec { --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-mpv-desktop.png + ''; - # display_mirror dependencies - jinja2 - pywebview - ]; + postFixup = '' + wrapQtApp $out/bin/jellyfin-mpv-desktop + ''; # no tests doCheck = false; 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 996225efb3a51..0000000000000 --- 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=[ |