Merge pull request #105000 from SamirHafez/plex-enable-aarch64

plex: Add aarch64 platform
This commit is contained in:
Pavol Rusnak 2020-11-26 17:29:34 +01:00 committed by GitHub
commit e6e85c4a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
{ stdenv
, fetchurl
, rpmextract
, dpkg
}:
# The raw package that fetches and extracts the Plex RPM. Override the source
@ -12,19 +12,22 @@ stdenv.mkDerivation rec {
pname = "plexmediaserver";
# Fetch the source
src = fetchurl {
url = "https://downloads.plex.tv/plex-media-server-new/${version}/redhat/plexmediaserver-${version}.x86_64.rpm";
sha256 = "0vqsmmgqcvvhxiqaw87qz9fdisyf9smp6ab069dz3nq39x7n9na0";
src = if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl {
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb";
sha256 = "18zj4baa085gbgc0y5gx7gnwzl131xyk34m5xcipfvfb434y98cp";
} else fetchurl {
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";
sha256 = "01rq2q6avjsvnns7jsd2a9vnmd4584fwdkp833gjgrrrqkf6h45y";
};
outputs = [ "out" "basedb" ];
nativeBuildInputs = [ rpmextract ];
nativeBuildInputs = [ dpkg ];
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
unpackPhase = ''
rpmextract $src
dpkg-deb -R $src .
'';
installPhase = ''
@ -52,7 +55,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = "https://plex.tv/";
license = licenses.unfree;
platforms = platforms.linux;
platforms = [ "x86_64-linux" "aarch64-linux" ];
maintainers = with maintainers; [
badmutex
colemickens