|
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, |
32 | 33 | }: |
33 | 34 | let |
34 | 35 | pname = "plex-desktop"; |
@@ -104,48 +105,52 @@ let |
104 | 105 |
|
105 | 106 | dontWrapQtApps = true; |
106 | 107 |
|
107 | | - installPhase = |
108 | | - '' |
109 | | - runHook preInstall |
| 108 | + installPhase = '' |
| 109 | + runHook preInstall |
110 | 110 |
|
111 | | - cp -r . $out |
| 111 | + cp -r . $out |
112 | 112 |
|
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 |
118 | 118 |
|
119 | | - runHook postInstall |
120 | | - ''; |
| 119 | + runHook postInstall |
| 120 | + ''; |
121 | 121 | }; |
122 | 122 | in |
123 | 123 | buildFHSEnv { |
124 | | - name = "${pname}-${version}"; |
125 | | - targetPkgs = pkgs: [ xkeyboard_config ]; |
| 124 | + inherit pname version meta; |
| 125 | + targetPkgs = pkgs: [ xkeyboard_config ]; |
126 | 126 |
|
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 | + ''; |
138 | 138 |
|
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 ]} |
143 | 143 |
|
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 |
149 | 154 | ''; |
| 155 | + passthru.updateScript = ./update.sh; |
150 | 156 | } |
151 | | - |
|
0 commit comments