2019-07-24 22:42:28 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, pkgconfig, cmake, python3, mkDerivation
|
2018-08-04 22:25:48 +02: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 11:40:00 +02: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 22:42:28 +02:00
|
|
|
in mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "plex-media-player";
|
2020-11-04 23:40:31 +01:00
|
|
|
version = "2.58.0.1076";
|
|
|
|
vsnHash = "38e019da";
|
2018-08-04 22:25:48 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plexinc";
|
|
|
|
repo = "plex-media-player";
|
|
|
|
rev = "v${version}-${vsnHash}";
|
2020-11-04 23:40:31 +01:00
|
|
|
sha256 = "XFwcSHn9wG30bDMGFITBmhp6/VI1RLmxMxFFxjntTmw=";
|
2018-08-04 22:25:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig cmake python3 ];
|
|
|
|
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}" ];
|
|
|
|
|
2020-04-20 11:40:00 +02:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2018-08-04 22:25:48 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Streaming media player for Plex";
|
|
|
|
license = licenses.gpl2;
|
2020-11-25 06:12:06 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://plex.tv";
|
2018-08-04 22:25:48 +02:00
|
|
|
};
|
|
|
|
}
|