signal-desktop: cleanup manual patchelf

The removed comment is no longer true, the bundled library no longer
exists. Use the default hook again to allow autoPatchelf to pick up
the bundled libraries.
This commit is contained in:
teutat3s 2024-04-24 12:31:22 +02:00 committed by Bjørn Forsman
parent 7e9344b106
commit 512b6bda5b
1 changed files with 2 additions and 10 deletions

View File

@ -130,10 +130,6 @@ in stdenv.mkDerivation rec {
dontBuild = true;
dontConfigure = true;
dontPatchELF = true;
# We need to run autoPatchelf manually with the "no-recurse" option, see
# https://github.com/NixOS/nixpkgs/pull/78413 for the reasons.
dontAutoPatchelf = true;
installPhase = ''
runHook preInstall
@ -143,11 +139,6 @@ in stdenv.mkDerivation rec {
mv usr/share $out/share
mv "opt/${dir}" "$out/lib/${dir}"
# Note: The following path contains bundled libraries:
# $out/lib/${dir}/resources/app.asar.unpacked/node_modules/sharp/vendor/lib/
# We run autoPatchelf with the "no-recurse" option to avoid picking those
# up, but resources/app.asar still requires them.
# Symlink to bin
mkdir -p $out/bin
ln -s "$out/lib/${dir}/${pname}" $out/bin/${pname}
@ -169,7 +160,8 @@ in stdenv.mkDerivation rec {
--replace "/opt/${dir}/${pname}" $out/bin/${pname} \
${if pname == "signal-desktop" then "--replace \"bin/signal-desktop\" \"bin/signal-desktop --use-tray-icon\"" else ""}
autoPatchelf --no-recurse -- "$out/lib/${dir}/"
# Note: The following path contains bundled libraries:
# $out/lib/${dir}/resources/app.asar.unpacked/node_modules/
patchelf --add-needed ${libpulseaudio}/lib/libpulse.so "$out/lib/${dir}/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-${ARCH}.node"
'';