diff mbox series

[bug#67120,v3,4/4] gnu: Add jellyfin-mpv-shim.

Message ID db6cdc6039806c6c6d907bfdf83eaae748f331ad.1708190337.git.ian@retrospec.tv
State New
Headers show
Series Add jellyfin-mpv-shim and deps | expand

Commit Message

Ian Eure Feb. 17, 2024, 5:20 p.m. UTC
* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: Ie030dee36b1c2afc796f082fdebf909cbddd59da
---
 gnu/packages/video.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 894543d3cc..c752198d1e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2751,6 +2751,46 @@  (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (let ((desktop-base "jellyfin_mpv_shim/integration/")
+        (package-id "com.github.iwalton3.jellyfin-mpv-shim"))
+    (package
+      (name "jellyfin-mpv-shim")
+      (version "2.6.0")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (pypi-uri "jellyfin-mpv-shim" version))
+         (sha256
+          (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+      (build-system pyproject-build-system)
+      (arguments
+       (list
+        #:tests? #f ;Disabled because they seem to boot the UI
+        #:phases #~(modify-phases %standard-phases
+                     (delete 'sanity-check) ;This also seems to boot the UI
+                     (add-after 'install 'install-desktop-file
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (let* ((out (assoc-ref outputs "out"))
+                                (apps (string-append out "/share/applications")))
+                           (install-file (string-append desktop-base
+                                                        package-id
+                                                        ".appdata.xml") apps)
+                           (install-file (string-append desktop-base
+                                                        package-id ".desktop")
+                                         apps) #t))))))
+      (native-inputs (list xorg-server-for-tests))
+      (propagated-inputs (list `(,python "tk")
+                               python-jellyfin-apiclient
+                               python-mpv
+                               python-mpv-jsonipc
+                               python-pystray
+                               python-requests))
+      (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+      (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+      (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+      (license license:gpl2))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")