# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0

{ pkgs, ... }:
let
  version = "1.28.0.5999-97678ded3";
  src = pkgs.fetchurl {
    url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";
    hash = "sha256-RxD0wLZ/Uw0niKZdAfEhDxnf2jZapbrjSjH3XerfTsM=";
  };
in
(pkgs.plex.override {
  plexRaw = (pkgs.plexRaw.overrideAttrs (oldAttrs: rec {
    inherit version src;
  }));
}).overrideAttrs (oldAttrs: {
  name = "plexmediaserver-${version}";
  inherit version src;
})