2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchurl, pkg-config, cmake, python3, mkDerivation
|
2018-08-04 20:25:48 +00:00
|
|
|
, libX11, libXrandr, qtbase, qtwebchannel, qtwebengine, qtx11extras
|
|
|
|
, libvdpau, SDL2, mpv, libGL }:
|
|
|
|
let
|
|
|
|
# During compilation, a CMake bundle is downloaded from `artifacts.plex.tv`,
|
|
|
|
# which then downloads a handful of web client-related files. To enable
|
|
|
|
# sandboxed builds, we manually download them and save them so these files
|
2020-04-20 09:40:00 +00:00
|
|
|
# are fetched ahead-of-time instead of during the CMake build. To update
|
|
|
|
# plex-media-player use the update.sh script, so the versions and hashes
|
|
|
|
# for these files are are also updated!
|
|
|
|
depSrcs = import ./deps.nix { inherit fetchurl; };
|
2019-07-24 20:42:28 +00:00
|
|
|
in mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "plex-media-player";
|
2021-06-12 05:59:16 +00:00
|
|
|
version = "2.58.1";
|
|
|
|
vsnHash = "ae73e074";
|
2018-08-04 20:25:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plexinc";
|
|
|
|
repo = "plex-media-player";
|
|
|
|
rev = "v${version}-${vsnHash}";
|
2021-06-12 05:59:16 +00:00
|
|
|
sha256 = "1q20fdp5d0blb0q6p2357bwdc2g65cadkgdp4w533ij2nyaxydjd";
|
2018-08-04 20:25:48 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake python3 ];
|
2018-08-04 20:25:48 +00:00
|
|
|
buildInputs = [ libX11 libXrandr qtbase qtwebchannel qtwebengine qtx11extras
|
|
|
|
libvdpau SDL2 mpv libGL ];
|
|
|
|
|
|
|
|
preConfigure = with depSrcs; ''
|
|
|
|
mkdir -p build/dependencies
|
|
|
|
ln -s ${webClient} build/dependencies/buildid-${webClientBuildId}.cmake
|
|
|
|
ln -s ${webClientDesktopHash} build/dependencies/web-client-desktop-${webClientDesktopBuildId}.tar.xz.sha1
|
|
|
|
ln -s ${webClientDesktop} build/dependencies/web-client-desktop-${webClientDesktopBuildId}.tar.xz
|
|
|
|
ln -s ${webClientTvHash} build/dependencies/web-client-tv-${webClientTvBuildId}.tar.xz.sha1
|
|
|
|
ln -s ${webClientTv} build/dependencies/web-client-tv-${webClientTvBuildId}.tar.xz
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DQTROOT=${qtbase}" ];
|
|
|
|
|
2022-01-23 22:14:06 +00:00
|
|
|
# plexmediaplayer currently segfaults under wayland
|
|
|
|
qtWrapperArgs = [ "--set" "QT_QPA_PLATFORM" "xcb" ];
|
|
|
|
|
2020-04-20 09:40:00 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-08-04 20:25:48 +00:00
|
|
|
description = "Streaming media player for Plex";
|
|
|
|
license = licenses.gpl2;
|
2022-01-23 22:10:26 +00:00
|
|
|
maintainers = with maintainers; [ b4dm4n ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://plex.tv";
|
2018-08-04 20:25:48 +00:00
|
|
|
};
|
|
|
|
}
|