diff --git a/nix/pkgs/plex-pass.nix b/nix/pkgs/plex-pass.nix index 19b564da32..74aa73f944 100644 --- a/nix/pkgs/plex-pass.nix +++ b/nix/pkgs/plex-pass.nix @@ -5,10 +5,10 @@ { pkgs, ... }: (pkgs.plex.override { plexRaw = (pkgs.plexRaw.overrideAttrs (oldAttrs: rec { - version = "1.19.4.2902-69560ce1e"; + version = "1.20.1.3252-a78fef9a9"; src = pkgs.fetchurl { - url = "https://downloads.plex.tv/plex-media-server-new/${version}/redhat/plexmediaserver-${version}.x86_64.rpm"; - sha256 = "1aqxjw65sw33phmbjb4h8jrn4cyn1l70fvz0sjliq7wqgh0qczwh"; + url = "https://downloads.plex.tv/plex-media-server-new/1.20.1.3252-a78fef9a9/redhat/plexmediaserver-1.20.1.3252-a78fef9a9.x86_64.rpm"; + sha256 = "0z50c6kgsxz1pj8d65ibliqd4xbkwjlmim76j8rjid3amhj50jmx"; }; })); }) diff --git a/nix/pkgs/updateplexpass.sh b/nix/pkgs/updateplexpass.sh new file mode 100755 index 0000000000..fdca5aca8a --- /dev/null +++ b/nix/pkgs/updateplexpass.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +VERSION_JSON_URL="https://plex.tv/pms/downloads/5.json?channel=plexpass" +alias jq="nix run depot.pkgs.jq -c jq" +VERSION_JSON="$(curl "$VERSION_JSON_URL")" + +VERSION="$(jq -r '.computer.Linux.version' <<< "$VERSION_JSON")" +RELEASE_JSON="$(jq '.computer.Linux.releases[] | select(.build == "linux-x86_64" and .distro == "redhat")' <<< "$VERSION_JSON")" +URL="$(jq -r '.url' <<< "$RELEASE_JSON")" +URL_HASH="$(nix-prefetch-url "$URL")" + +cat < +# +# SPDX-License-Identifier: Apache-2.0 + +{ pkgs, ... }: +(pkgs.plex.override { + plexRaw = (pkgs.plexRaw.overrideAttrs (oldAttrs: rec { + version = "${VERSION}"; + src = pkgs.fetchurl { + url = "${URL}"; + sha256 = "${URL_HASH}"; + }; + })); +}) +EOF