nix/pkgs: update plex-pass
This commit is contained in:
parent
a71cb99af8
commit
9f90e567f2
2 changed files with 33 additions and 3 deletions
|
@ -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";
|
||||
};
|
||||
}));
|
||||
})
|
||||
|
|
30
nix/pkgs/updateplexpass.sh
Executable file
30
nix/pkgs/updateplexpass.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
#
|
||||
# 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 <<EOF
|
||||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
#
|
||||
# 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
|
Loading…
Reference in a new issue