Merge pull request #115767 from jojosch/jellyfin-mpv-shim-1.8.1
This commit is contained in:
commit
a65965b9e3
@ -1,25 +1,68 @@
|
|||||||
{ lib, buildPythonApplication, fetchFromGitHub, callPackage
|
{ lib
|
||||||
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
|
, buildPythonApplication
|
||||||
, pillow, tkinter, pystray, jinja2, pywebview }:
|
, 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 {
|
buildPythonApplication rec {
|
||||||
pname = "jellyfin-mpv-shim";
|
pname = "jellyfin-mpv-shim";
|
||||||
version = "1.7.1";
|
version = "1.10.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "iwalton3";
|
inherit pname version;
|
||||||
repo = pname;
|
sha256 = "sha256-bcTCp2K1zRgobBAi7A62VPogM6km+DixRERWEOm9Yu4=";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0alrh5h3f8pq9mrq09jmpqa0yslxsjqwij6kwn24ggbwc10zkq75";
|
|
||||||
fetchSubmodules = true; # needed for display_mirror css file
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
propagatedBuildInputs = [
|
||||||
./disable-desktop-client.patch
|
jellyfin-apiclient-python
|
||||||
./disable-update-check.patch
|
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:
|
# override $HOME directory:
|
||||||
@ -34,31 +77,27 @@ buildPythonApplication rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# link the default shader pack
|
substituteInPlace jellyfin_mpv_shim/conf.py \
|
||||||
ln -s ${shaderPack} jellyfin_mpv_shim/default_shader_pack
|
--replace "check_updates: bool = True" "check_updates: bool = False" \
|
||||||
|
--replace "notify_updates: bool = True" "notify_updates: bool = False"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
postInstall = ''
|
||||||
jellyfin-apiclient-python
|
mkdir -p $out/share/pixmaps
|
||||||
mpv
|
cp jellyfin_mpv_shim/integration/jellyfin-256.png $out/share/pixmaps/jellyfin-desktop.png
|
||||||
pillow
|
'';
|
||||||
python-mpv-jsonipc
|
|
||||||
|
|
||||||
# gui dependencies
|
postFixup = ''
|
||||||
pystray
|
wrapQtApp $out/bin/jellyfin-desktop
|
||||||
tkinter
|
wrapQtApp $out/bin/jellyfin-mpv-desktop
|
||||||
|
'';
|
||||||
# display_mirror dependencies
|
|
||||||
jinja2
|
|
||||||
pywebview
|
|
||||||
];
|
|
||||||
|
|
||||||
# no tests
|
# no tests
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
||||||
|
|
||||||
meta = with lib; {
|
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";
|
description = "Allows casting of videos to MPV via the jellyfin mobile and web app";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ jojosch ];
|
maintainers = with maintainers; [ jojosch ];
|
||||||
|
@ -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=[
|
|
@ -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,
|
|
||||||
}
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,24 +1,23 @@
|
|||||||
{ lib, buildPythonPackage, fetchFromGitHub, requests
|
{ lib, buildPythonPackage, fetchPypi, requests
|
||||||
, websocket_client, pythonOlder }:
|
, websocket_client, pythonOlder }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "jellyfin-apiclient-python";
|
pname = "jellyfin-apiclient-python";
|
||||||
version = "1.6.1";
|
version = "1.7.2";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "iwalton3";
|
inherit pname version;
|
||||||
repo = "jellyfin-apiclient-python";
|
sha256 = "sha256-nSLUa9/jAT6XrHo77kV5HYBxPO/lhcWKqPfpES7ul9A=";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0f7czq83ic22fz1vnf0cavb7l3grcxxd5yyw9wcjz3g1j2d76735";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ requests websocket_client ];
|
propagatedBuildInputs = [ requests websocket_client ];
|
||||||
|
|
||||||
|
doCheck = false; # no tests
|
||||||
pythonImportsCheck = [ "jellyfin_apiclient_python" ];
|
pythonImportsCheck = [ "jellyfin_apiclient_python" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/iwalton3/jellyfin-apiclient-python";
|
homepage = "https://github.com/jellyfin/jellyfin-apiclient-python";
|
||||||
description = "Python API client for Jellyfin";
|
description = "Python API client for Jellyfin";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ jojosch ];
|
maintainers = with maintainers; [ jojosch ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user