nixpkgs/pkgs/applications/video/plex-mpv-shim/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

53 lines
1.6 KiB
Nix

{ lib, buildPythonApplication, fetchFromGitHub, fetchpatch, python, mpv, requests, python-mpv-jsonipc, pystray, tkinter
, wrapGAppsHook3, gobject-introspection, mpv-shim-default-shaders }:
buildPythonApplication rec {
pname = "plex-mpv-shim";
version = "1.11.0";
src = fetchFromGitHub {
owner = "iwalton3";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-hUGKOJEDZMK5uhHoevFt1ay6QQEcoN4F8cPxln5uMRo=";
};
patches = [
# pull in upstream commit to fix python-mpv dependency name -- remove when version > 1.11.0
(fetchpatch {
url = "https://github.com/iwalton3/plex-mpv-shim/commit/d8643123a8ec79216e02850b08f63b06e4e0a2ea.diff";
hash = "sha256-nc+vwYnAtMjVzL2fIQeTAqhf3HBseL+2pFEtv8zNUXo=";
})
];
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
propagatedBuildInputs = [ mpv requests python-mpv-jsonipc pystray tkinter ];
# needed for pystray to access appindicator using GI
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
dontWrapGApps = true;
postInstall = ''
# put link to shaders where upstream package expects them
ln -s ${mpv-shim-default-shaders}/share/mpv-shim-default-shaders $out/${python.sitePackages}/plex_mpv_shim/default_shader_pack
'';
# does not contain tests
doCheck = false;
meta = with lib; {
homepage = "https://github.com/iwalton3/plex-mpv-shim";
description = "Allows casting of videos to MPV via the Plex mobile and web app";
maintainers = with maintainers; [ devusb ];
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "plex-mpv-shim";
};
}