Skip to content

Commit 744e61f

Browse files
plex-desktop: remove version number from name (#345754)
2 parents 64046f0 + 4e3b69e commit 744e61f

File tree

2 files changed

+71
-65
lines changed

2 files changed

+71
-65
lines changed

pkgs/by-name/pl/plex-desktop/package.nix

Lines changed: 70 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
{ alsa-lib
2-
, autoPatchelfHook
3-
, buildFHSEnv
4-
, dbus
5-
, elfutils
6-
, expat
7-
, extraEnv ? { }
8-
, fetchFromGitLab
9-
, fetchurl
10-
, glib
11-
, glibc
12-
, lib
13-
, libGL
14-
, libapparmor
15-
, libbsd
16-
, libedit
17-
, libffi_3_3
18-
, libgcrypt
19-
, libglvnd
20-
, makeShellWrapper
21-
, sqlite
22-
, squashfsTools
23-
, stdenv
24-
, tcp_wrappers
25-
, udev
26-
, waylandpp
27-
, writeShellScript
28-
, xkeyboard_config
29-
, xorg
30-
, xz
31-
, zstd
1+
{
2+
alsa-lib,
3+
autoPatchelfHook,
4+
buildFHSEnv,
5+
dbus,
6+
elfutils,
7+
expat,
8+
extraEnv ? { },
9+
fetchFromGitLab,
10+
fetchurl,
11+
glib,
12+
glibc,
13+
lib,
14+
libGL,
15+
libapparmor,
16+
libbsd,
17+
libedit,
18+
libffi_3_3,
19+
libgcrypt,
20+
libglvnd,
21+
makeShellWrapper,
22+
sqlite,
23+
squashfsTools,
24+
stdenv,
25+
tcp_wrappers,
26+
udev,
27+
waylandpp,
28+
writeShellScript,
29+
xkeyboard_config,
30+
xorg,
31+
xz,
32+
zstd,
3233
}:
3334
let
3435
pname = "plex-desktop";
@@ -104,48 +105,52 @@ let
104105

105106
dontWrapQtApps = true;
106107

107-
installPhase =
108-
''
109-
runHook preInstall
108+
installPhase = ''
109+
runHook preInstall
110110
111-
cp -r . $out
111+
cp -r . $out
112112
113-
ln -s ${libedit}/lib/libedit.so.0 $out/lib/libedit.so.2
114-
rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2
115-
ln -s ${alsa-lib}/lib/libasound.so.2 $out/usr/lib/x86_64-linux-gnu/libasound.so.2
116-
rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
117-
ln -s ${alsa-lib}/lib/libasound.so.2.0.0 $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
113+
ln -s ${libedit}/lib/libedit.so.0 $out/lib/libedit.so.2
114+
rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2
115+
ln -s ${alsa-lib}/lib/libasound.so.2 $out/usr/lib/x86_64-linux-gnu/libasound.so.2
116+
rm $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
117+
ln -s ${alsa-lib}/lib/libasound.so.2.0.0 $out/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
118118
119-
runHook postInstall
120-
'';
119+
runHook postInstall
120+
'';
121121
};
122122
in
123123
buildFHSEnv {
124-
name = "${pname}-${version}";
125-
targetPkgs = pkgs: [ xkeyboard_config ];
124+
inherit pname version meta;
125+
targetPkgs = pkgs: [ xkeyboard_config ];
126126

127-
extraInstallCommands = ''
128-
mkdir -p $out/share/applications $out/share/icons/hicolor/scalable/apps
129-
install -m 444 -D ${plex-desktop}/meta/gui/plex-desktop.desktop $out/share/applications/plex-desktop.desktop
130-
substituteInPlace $out/share/applications/plex-desktop.desktop \
131-
--replace-fail \
132-
'Icon=''${SNAP}/meta/gui/icon.png' \
133-
'Icon=${plex-desktop}/meta/gui/icon.png' \
134-
--replace-fail \
135-
'Exec=plex-desktop' \
136-
'Exec=plex-desktop-${version}'
137-
'';
127+
extraInstallCommands = ''
128+
mkdir -p $out/share/applications $out/share/icons/hicolor/scalable/apps
129+
install -m 444 -D ${plex-desktop}/meta/gui/plex-desktop.desktop $out/share/applications/plex-desktop.desktop
130+
substituteInPlace $out/share/applications/plex-desktop.desktop \
131+
--replace-fail \
132+
'Icon=''${SNAP}/meta/gui/icon.png' \
133+
'Icon=${plex-desktop}/meta/gui/icon.png' \
134+
--replace-fail \
135+
'Exec=plex-desktop' \
136+
'Exec=plex-desktop-${version}'
137+
'';
138138

139-
runScript = writeShellScript "plex-desktop.sh" ''
140-
# Widevine won't download unless this directory exists.
141-
mkdir -p $HOME/.cache/plex/
142-
PLEX_USR_PATH=${lib.makeSearchPath "usr/lib/x86_64-linux-gnu" [ plex-desktop ]}
139+
runScript = writeShellScript "plex-desktop.sh" ''
140+
# Widevine won't download unless this directory exists.
141+
mkdir -p $HOME/.cache/plex/
142+
PLEX_USR_PATH=${lib.makeSearchPath "usr/lib/x86_64-linux-gnu" [ plex-desktop ]}
143143
144-
set -o allexport
145-
LD_LIBRARY_PATH=${lib.makeLibraryPath [ plex-desktop libglvnd-1_4_0 ]}:$PLEX_USR_PATH
146-
LIBGL_DRIVERS_PATH=$PLEX_USR_PATH/dri
147-
${lib.toShellVars extraEnv}
148-
exec ${plex-desktop}/Plex.sh
144+
set -o allexport
145+
LD_LIBRARY_PATH=${
146+
lib.makeLibraryPath [
147+
plex-desktop
148+
libglvnd-1_4_0
149+
]
150+
}:$PLEX_USR_PATH
151+
LIBGL_DRIVERS_PATH=$PLEX_USR_PATH/dri
152+
${lib.toShellVars extraEnv}
153+
exec ${plex-desktop}/Plex.sh
149154
'';
155+
passthru.updateScript = ./update.sh;
150156
}
151-

pkgs/by-name/pl/plex-desktop/update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ sed --regexp-extended \
7373
# try to build the updated version
7474
#
7575

76+
export NIXPKGS_ALLOW_UNFREE=1
7677
if ! nix-build -A plex-desktop "$nixpkgs"; then
7778
echo "The updated plex-desktop failed to build."
7879
exit 1

0 commit comments

Comments
 (0)