From 512b6bda5bf5bb37bd55752f469493b673624eb6 Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:31:22 +0200 Subject: [PATCH] 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. --- .../instant-messengers/signal-desktop/generic.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix index c1ca934437a7..e8518c310a7c 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix @@ -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" '';