Change:
<ins> #!/usr/bin/env nix-shell #! nix-shell -i bash -p curl jq git gnused gnugrep # executing this script without arguments will # - find the newest stable plex-desktop version avaiable on snapcraft (https://snapcraft.io/plex-desktop) # - read the current plex-desktop version from the current nix expression # - update the nix expression if the versions differ # - try to build the updated version, exit if that fails # - give instructions for upstreaming # As an optional argument you can specify the snapcraft channel to update to. # Default is `stable` and only stable updates should be pushed to nixpkgs. For # testing you may specify `candidate` or `edge`. channel="${1:-stable}" # stable/candidate/edge nixpkgs="$(git rev-parse --show-toplevel)" plex_nix="$nixpkgs/pkgs/by-name/pl/plex-desktop/package.nix" # # find the newest stable plex-desktop version avaiable on snapcraft # # create bash array from snap info snap_info=($( curl -s -H 'X-Ubuntu-Series: 16'  "https://api.snapcraft.io/api/v1/snaps/details/plex-desktop?channel=$channel"  | jq --raw-output  '.revision,.download_sha512,.version,.last_updated' )) # "revision" is the actual version identifier on snapcraft, the "version" is # just for human consumption. Revision is just an integer that gets increased # by one every (stable or unstable) release. revision="${snap_info[0]}" # We need to escape the slashes hash="$(nix-hash --to-sri --type sha512 ${snap_info[1]} | sed 's|/|/|g')" upstream_version="${snap_info[2]}" last_updated="${snap_info[3]}" echo "Latest $channel release is $upstream_version from $last_updated." # # read the current plex-desktop version from the currently *committed* nix expression # current_version=$( grep 'versions*=' "$plex_nix"  | sed -Ene 's/.*"(.*)".*/1/p' ) echo "Current version: $current_version" # # update the nix expression if the versions differ # if [[ "$current_version" == "$upstream_version" ]]; then echo "Plex is already up-to-date" exit 0 fi echo "Updating from ${current_version} to ${upstream_version}, released on ${last_updated}" # search-and-replace revision, hash and version sed --regexp-extended  -e 's/revs*=s*"[0-9]+"s*;/rev = "'"${revision}"'";/'  -e 's/hashs*=s*"[^"]*"s*;/hash = "'"${hash}"'";/'  -e 's/versions*=s*".*"s*;/version = "'"${upstream_version}"'";/'  -i "$plex_nix" # # try to build the updated version # if ! nix-build -A plex-desktop "$nixpkgs"; then echo "The updated plex-desktop failed to build." exit 1 fi # Commit changes git add "$plex_nix" git commit -m "plex-desktop: ${current_version} -> ${upstream_version}" </ins>

Discussion:
Project description Streaming media player for Plex Metadata homepage URL: source URL: license: proprietary platforms: linux Unfortunately, this app is only available as a Snap or a Flatpak. It looks like Snap is easier to unpack, as we have . There is also , which appears to be unmaintened.
would also appreciate this being packaged, the flatpak version does not start for me ( I don't like using flatpak anyways).
It also supports Darwin and Windows.
Just to be clear this is not this package This is a completely different package with different build steps that just looks the exact same.
Submitted a draft PR that adds this to nixpkgs. What's there now works on my machine&trade; (3 of them). I'd appreciate people testing this out on different hardware and suggesting any improvements that makes this more reliable. I have a couple more things I'd like to do before officially submitting this. Edit: Also need help with Darwin. I'm guessing it doesn't work there and I don't have a convenient way to test that platform.