about summary refs log tree commit diff
path: root/pkgs/applications/video/jellyfin-mpv-shim
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2020-03-05 10:26:01 +0100
committerJon <jonringer@users.noreply.github.com>2020-03-11 10:55:46 -0700
commitaac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a (patch)
tree2736ebbaa6ddd26229e25d999154f95a8c551431 /pkgs/applications/video/jellyfin-mpv-shim
parente0a0263d44d322e6fdc0a223d8e192a01f8d5def (diff)
downloadnixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar.gz
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar.bz2
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar.lz
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar.xz
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.tar.zst
nixlib-aac3717ff4b96d7b253b4713b96f9d0ac2c8bc1a.zip
jellyfin-mpv-shim: init at 1.4.1
Diffstat (limited to 'pkgs/applications/video/jellyfin-mpv-shim')
-rw-r--r--pkgs/applications/video/jellyfin-mpv-shim/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/pkgs/applications/video/jellyfin-mpv-shim/default.nix
new file mode 100644
index 000000000000..7842c48a78a6
--- /dev/null
+++ b/pkgs/applications/video/jellyfin-mpv-shim/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, fetchurl
+, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
+, pillow, tkinter, pystray, jinja2, pywebview }:
+
+buildPythonApplication rec {
+  pname = "jellyfin-mpv-shim";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "iwalton3";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "195vplq4182pq62sn6ci0a8p57k6zv8pk1gmifmwdv69wzaph043";
+    fetchSubmodules = true; # needed for display_mirror css file
+  };
+
+  # 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
+  '';
+
+  propagatedBuildInputs = [
+    jellyfin-apiclient-python
+    mpv
+    pillow
+    python-mpv-jsonipc
+
+    # gui dependencies
+    pystray
+    tkinter
+
+    # display_mirror dependencies
+    jinja2
+    pywebview
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/iwalton3/jellyfin-mpv-shim";
+    description = "Allows casting of videos to MPV via the jellyfin mobile and web app.";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ jojosch ];
+  };
+}