aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/jellyfin-mpv-shim')
-rw-r--r--nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch12
-rw-r--r--nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch15
-rw-r--r--nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix25
4 files changed, 69 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix
index de931074091..825aac4dad2 100644
--- a/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix
+++ b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix
@@ -1,19 +1,27 @@
-{ stdenv, buildPythonApplication, fetchFromGitHub, fetchurl
+{ stdenv, buildPythonApplication, fetchFromGitHub, callPackage
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
, pillow, tkinter, pystray, jinja2, pywebview }:
+let
+ shaderPack = callPackage ./shader-pack.nix {};
+in
buildPythonApplication rec {
pname = "jellyfin-mpv-shim";
- version = "1.4.2";
+ version = "1.7.1";
src = fetchFromGitHub {
owner = "iwalton3";
repo = pname;
rev = "v${version}";
- sha256 = "1cnii5wj0pgqg3dqk5cm6slpbs3730x8ippps4cjbsxcsrmqjpx6";
+ sha256 = "0alrh5h3f8pq9mrq09jmpqa0yslxsjqwij6kwn24ggbwc10zkq75";
fetchSubmodules = true; # needed for display_mirror css file
};
+ patches = [
+ ./disable-desktop-client.patch
+ ./disable-update-check.patch
+ ];
+
# override $HOME directory:
# error: [Errno 13] Permission denied: '/homeless-shelter'
#
@@ -25,6 +33,11 @@ buildPythonApplication rec {
rm jellyfin_mpv_shim/win_utils.py
'';
+ postPatch = ''
+ # link the default shader pack
+ ln -s ${shaderPack} jellyfin_mpv_shim/default_shader_pack
+ '';
+
propagatedBuildInputs = [
jellyfin-apiclient-python
mpv
@@ -42,7 +55,7 @@ buildPythonApplication rec {
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.";
+ description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
license = licenses.gpl3;
maintainers = with maintainers; [ jojosch ];
};
diff --git a/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch
new file mode 100644
index 00000000000..996225efb3a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-desktop-client.patch
@@ -0,0 +1,12 @@
+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/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch
new file mode 100644
index 00000000000..6941b956e85
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/disable-update-check.patch
@@ -0,0 +1,15 @@
+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/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix
new file mode 100644
index 00000000000..fd33e8c90b5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/shader-pack.nix
@@ -0,0 +1,25 @@
+{ 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 stdenv.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 ];
+ };
+}