about summary refs log tree commit diff
path: root/pkgs/by-name/pl/plex-desktop/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/pl/plex-desktop/package.nix')
-rw-r--r--pkgs/by-name/pl/plex-desktop/package.nix138
1 files changed, 70 insertions, 68 deletions
diff --git a/pkgs/by-name/pl/plex-desktop/package.nix b/pkgs/by-name/pl/plex-desktop/package.nix
index 50080c0153c9..aa79d6040db4 100644
--- a/pkgs/by-name/pl/plex-desktop/package.nix
+++ b/pkgs/by-name/pl/plex-desktop/package.nix
@@ -1,39 +1,40 @@
-{ alsa-lib
-, autoPatchelfHook
-, buildFHSEnv
-, dbus
-, elfutils
-, expat
-, extraEnv ? { }
-, fetchFromGitLab
-, fetchurl
-, glib
-, glibc
-, lib
-, libGL
-, libapparmor
-, libbsd
-, libedit
-, libffi_3_3
-, libgcrypt
-, libglvnd
-, makeShellWrapper
-, sqlite
-, squashfsTools
-, stdenv
-, tcp_wrappers
-, udev
-, waylandpp
-, writeShellScript
-, xkeyboard_config
-, xorg
-, xz
-, zstd
+{
+  alsa-lib,
+  autoPatchelfHook,
+  buildFHSEnv,
+  dbus,
+  elfutils,
+  expat,
+  extraEnv ? { },
+  fetchFromGitLab,
+  fetchurl,
+  glib,
+  glibc,
+  lib,
+  libGL,
+  libapparmor,
+  libbsd,
+  libedit,
+  libffi_3_3,
+  libgcrypt,
+  libglvnd,
+  makeShellWrapper,
+  sqlite,
+  squashfsTools,
+  stdenv,
+  tcp_wrappers,
+  udev,
+  waylandpp,
+  writeShellScript,
+  xkeyboard_config,
+  xorg,
+  xz,
+  zstd,
 }:
 let
   pname = "plex-desktop";
-  version = "1.96.0";
-  rev = "69";
+  version = "1.101.0";
+  rev = "75";
   meta = {
     homepage = "https://plex.tv/";
     description = "Streaming media player for Plex";
@@ -64,7 +65,7 @@ let
 
     src = fetchurl {
       url = "https://api.snapcraft.io/api/v1/snaps/download/qc6MFRM433ZhI1XjVzErdHivhSOhlpf0_${rev}.snap";
-      hash = "sha512-rECc8rK1ENAL5mXdabO8ynudCaSzz0yygOyg4gMbCtddgqwSOanP24/oguzPLr3zdRMC3VSf9B3hr2BGQ54tzg==";
+      hash = "sha512-3ofO4a8HDWeUfjsv+4A5bC0jlQwxIew1CnL39Oa0bjnqShwRQjMW1vSHOjsJ1AHMkbp3h5W/2tFRxPL2C/Heqg==";
     };
 
     nativeBuildInputs = [ squashfsTools ];
@@ -104,48 +105,49 @@ let
 
     dontWrapQtApps = true;
 
-    installPhase =
-      ''
-        runHook preInstall
+    installPhase = ''
+      runHook preInstall
 
-        cp -r . $out
+      cp -r . $out
 
-        ln -s ${libedit}/lib/libedit.so.0 $out/lib/libedit.so.2
-        rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2
-        ln -s ${alsa-lib}/lib/libasound.so.2 $out/usr/lib/x86_64-linux-gnu/libasound.so.2
-        rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
-        ln -s ${alsa-lib}/lib/libasound.so.2.0.0 $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
+      ln -s ${libedit}/lib/libedit.so.0 $out/lib/libedit.so.2
+      rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2
+      ln -s ${alsa-lib}/lib/libasound.so.2 $out/usr/lib/x86_64-linux-gnu/libasound.so.2
+      rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
+      ln -s ${alsa-lib}/lib/libasound.so.2.0.0 $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
 
-        runHook postInstall
-      '';
+      runHook postInstall
+    '';
   };
 in
 buildFHSEnv {
-    name = "${pname}-${version}";
-    targetPkgs = pkgs: [ xkeyboard_config ];
+  inherit pname version meta;
+  targetPkgs = pkgs: [ xkeyboard_config ];
 
-    extraInstallCommands = ''
-      mkdir -p $out/share/applications $out/share/icons/hicolor/scalable/apps
-      install -m 444 -D ${plex-desktop}/meta/gui/plex-desktop.desktop $out/share/applications/plex-desktop.desktop
-      substituteInPlace $out/share/applications/plex-desktop.desktop \
-        --replace-fail \
-        'Icon=''${SNAP}/meta/gui/icon.png' \
-        'Icon=${plex-desktop}/meta/gui/icon.png' \
-        --replace-fail \
-        'Exec=plex-desktop' \
-        'Exec=plex-desktop-${version}'
-    '';
+  extraInstallCommands = ''
+    mkdir -p $out/share/applications $out/share/icons/hicolor/scalable/apps
+    install -m 444 -D ${plex-desktop}/meta/gui/plex-desktop.desktop $out/share/applications/plex-desktop.desktop
+    substituteInPlace $out/share/applications/plex-desktop.desktop \
+      --replace-fail \
+      'Icon=''${SNAP}/meta/gui/icon.png' \
+      'Icon=${plex-desktop}/meta/gui/icon.png'
+  '';
 
-    runScript = writeShellScript "plex-desktop.sh" ''
-      # Widevine won't download unless this directory exists.
-      mkdir -p $HOME/.cache/plex/
-      PLEX_USR_PATH=${lib.makeSearchPath "usr/lib/x86_64-linux-gnu"  [ plex-desktop ]}
+  runScript = writeShellScript "plex-desktop.sh" ''
+    # Widevine won't download unless this directory exists.
+    mkdir -p $HOME/.cache/plex/
+    PLEX_USR_PATH=${lib.makeSearchPath "usr/lib/x86_64-linux-gnu" [ plex-desktop ]}
 
-      set -o allexport
-      LD_LIBRARY_PATH=${lib.makeLibraryPath [ plex-desktop libglvnd-1_4_0 ]}:$PLEX_USR_PATH
-      LIBGL_DRIVERS_PATH=$PLEX_USR_PATH/dri
-      ${lib.toShellVars extraEnv}
-      exec ${plex-desktop}/Plex.sh
+    set -o allexport
+    LD_LIBRARY_PATH=${
+      lib.makeLibraryPath [
+        plex-desktop
+        libglvnd-1_4_0
+      ]
+    }:$PLEX_USR_PATH
+    LIBGL_DRIVERS_PATH=$PLEX_USR_PATH/dri
+    ${lib.toShellVars extraEnv}
+    exec ${plex-desktop}/Plex.sh
   '';
+  passthru.updateScript = ./update.sh;
 }
-