mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Merge pull request #202246 from Myaats/jellyfin-mpv-shim-desktop-item
This commit is contained in:
commit
a50cf79808
@ -1,12 +1,15 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonApplication
|
, buildPythonApplication
|
||||||
|
, copyDesktopItems
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, jellyfin-apiclient-python
|
, jellyfin-apiclient-python
|
||||||
, jinja2
|
, jinja2
|
||||||
|
, makeDesktopItem
|
||||||
, mpv
|
, mpv
|
||||||
, pillow
|
, pillow
|
||||||
, pystray
|
, pystray
|
||||||
|
, python
|
||||||
, python-mpv-jsonipc
|
, python-mpv-jsonipc
|
||||||
, pywebview
|
, pywebview
|
||||||
, tkinter
|
, tkinter
|
||||||
@ -23,6 +26,7 @@ buildPythonApplication rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
copyDesktopItems
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
];
|
];
|
||||||
@ -59,6 +63,15 @@ buildPythonApplication rec {
|
|||||||
--replace "notify_updates: bool = True" "notify_updates: bool = False"
|
--replace "notify_updates: bool = True" "notify_updates: bool = False"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Install all the icons for the desktop item
|
||||||
|
postInstall = ''
|
||||||
|
for s in 16 32 48 64 128 256; do
|
||||||
|
mkdir -p $out/share/icons/hicolor/''${s}x''${s}/apps
|
||||||
|
ln -s $out/${python.sitePackages}/jellyfin_mpv_shim/integration/jellyfin-''${s}.png \
|
||||||
|
$out/share/icons/hicolor/''${s}x''${s}/apps/${pname}.png
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
# needed for pystray to access appindicator using GI
|
# needed for pystray to access appindicator using GI
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||||
@ -69,6 +82,16 @@ buildPythonApplication rec {
|
|||||||
doCheck = false;
|
doCheck = false;
|
||||||
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
pythonImportsCheck = [ "jellyfin_mpv_shim" ];
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
exec = pname;
|
||||||
|
icon = pname;
|
||||||
|
desktopName = "Jellyfin MPV Shim";
|
||||||
|
categories = [ "Video" "AudioVideo" "TV" "Player" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/jellyfin/jellyfin-mpv-shim";
|
homepage = "https://github.com/jellyfin/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";
|
||||||
|
Loading…
Reference in New Issue
Block a user