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
|
||||
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
|
||||
, pillow, tkinter, pystray, jinja2, pywebview }:
|
||||
{ lib
|
||||
, buildPythonApplication
|
||||
, 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 {
|
||||
pname = "jellyfin-mpv-shim";
|
||||
version = "1.7.1";
|
||||
version = "1.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iwalton3";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0alrh5h3f8pq9mrq09jmpqa0yslxsjqwij6kwn24ggbwc10zkq75";
|
||||
fetchSubmodules = true; # needed for display_mirror css file
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-bcTCp2K1zRgobBAi7A62VPogM6km+DixRERWEOm9Yu4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./disable-desktop-client.patch
|
||||
./disable-update-check.patch
|
||||
propagatedBuildInputs = [
|
||||
jellyfin-apiclient-python
|
||||
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:
|
||||
@ -34,31 +77,27 @@ buildPythonApplication rec {
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
# link the default shader pack
|
||||
ln -s ${shaderPack} jellyfin_mpv_shim/default_shader_pack
|
||||
substituteInPlace jellyfin_mpv_shim/conf.py \
|
||||
--replace "check_updates: bool = True" "check_updates: bool = False" \
|
||||
--replace "notify_updates: bool = True" "notify_updates: bool = False"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jellyfin-apiclient-python
|
||||
mpv
|
||||
pillow
|
||||
python-mpv-jsonipc
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/pixmaps
|
||||
cp jellyfin_mpv_shim/integration/jellyfin-256.png $out/share/pixmaps/jellyfin-desktop.png
|
||||
'';
|
||||
|
||||
# gui dependencies
|
||||
pystray
|
||||
tkinter
|
||||
|
||||
# display_mirror dependencies
|
||||
jinja2
|
||||
pywebview
|
||||
];
|
||||
postFixup = ''
|
||||
wrapQtApp $out/bin/jellyfin-desktop
|
||||
wrapQtApp $out/bin/jellyfin-mpv-desktop
|
||||
'';
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
||||
|
||||
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";
|
||||
license = licenses.gpl3;
|
||||
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 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jellyfin-apiclient-python";
|
||||
version = "1.6.1";
|
||||
version = "1.7.2";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iwalton3";
|
||||
repo = "jellyfin-apiclient-python";
|
||||
rev = "v${version}";
|
||||
sha256 = "0f7czq83ic22fz1vnf0cavb7l3grcxxd5yyw9wcjz3g1j2d76735";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-nSLUa9/jAT6XrHo77kV5HYBxPO/lhcWKqPfpES7ul9A=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ requests websocket_client ];
|
||||
|
||||
doCheck = false; # no tests
|
||||
pythonImportsCheck = [ "jellyfin_apiclient_python" ];
|
||||
|
||||
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";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ jojosch ];
|
||||
|
Loading…
Reference in New Issue
Block a user