anchor.diff:    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 = ''
  
positive.code: { stdenv
  , fetchurl
  , rpmextract
  }:
  
  # The raw package that fetches and extracts the Plex RPM. Override the source
  
negative.code:   meta = with stdenv.lib; {
      homepage = "https://plex.tv/";
      license = licenses.unfree;
      platforms = [ "x86_64-linux" "aarch64-linux" ];
      maintainers = with maintainers; [
        badmutex
        colemickens
  