mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Set QTWEBENGINE_FORCE_USE_GBM to 0 to fix/work around a severe video playback bug. The fix is copied from https://github.com/NixOS/nixpkgs/issues/519073#issuecomment-4434887630 Fixes https://github.com/nixos/nixpkgs/issues/519073 ("jellyfin-desktop: video no longer plays")
97 lines
2.2 KiB
Nix
97 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
cmake,
|
|
ninja,
|
|
python3,
|
|
kdePackages,
|
|
mpv-unwrapped,
|
|
libcec,
|
|
SDL2,
|
|
libxrandr,
|
|
cacert,
|
|
nix-update-script,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "jellyfin-desktop";
|
|
version = "2.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jellyfin";
|
|
repo = "jellyfin-desktop";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-ITlYOrMS6COx9kDRSBi4wM6mzL/Q2G5X9GbABwDIOe4=";
|
|
fetchSubmodules = true;
|
|
};
|
|
patches = [
|
|
./non-fatal-unique-app.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
kdePackages.wrapQtAppsHook
|
|
]
|
|
++ lib.optional stdenv.hostPlatform.isDarwin python3;
|
|
|
|
buildInputs = [
|
|
kdePackages.qtbase
|
|
kdePackages.qtdeclarative
|
|
kdePackages.qtwebchannel
|
|
kdePackages.qtwebengine
|
|
mpv-unwrapped
|
|
|
|
# input sources
|
|
libcec
|
|
SDL2
|
|
|
|
# frame rate switching
|
|
libxrandr
|
|
cacert
|
|
]
|
|
++ lib.optional (!stdenv.hostPlatform.isDarwin) kdePackages.mpvqt;
|
|
|
|
cmakeFlags = [
|
|
"-DCHECK_FOR_UPDATES=OFF"
|
|
# workaround for Qt cmake weirdness
|
|
"-DQT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES=ON"
|
|
]
|
|
++ lib.optional stdenv.hostPlatform.isDarwin "-DUSE_STATIC_MPVQT=ON"
|
|
++ lib.optional (!stdenv.hostPlatform.isDarwin) "-DUSE_STATIC_MPVQT=OFF";
|
|
|
|
qtWrapperArgs = [
|
|
"--set QT_STYLE_OVERRIDE Fusion"
|
|
"--set NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
# Disable hardware acceleration to fix severe flickering in video playback.
|
|
"--set-default QTWEBENGINE_FORCE_USE_GBM 0"
|
|
];
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p $out/bin $out/Applications
|
|
mv "$out/Jellyfin Desktop.app" $out/Applications
|
|
ln -s "$out/Applications/Jellyfin Desktop.app/Contents/MacOS/Jellyfin Desktop" $out/bin/jellyfindesktop
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
homepage = "https://github.com/jellyfin/jellyfin-desktop";
|
|
description = "Jellyfin Desktop Client";
|
|
license = with lib.licenses; [
|
|
gpl2Only
|
|
mit
|
|
];
|
|
platforms = [
|
|
"aarch64-linux"
|
|
"x86_64-linux"
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
jojosch
|
|
paumr
|
|
];
|
|
mainProgram = "jellyfin-desktop";
|
|
};
|
|
})
|