Commit 512b6bda authored by teutat3s's avatar teutat3s Committed by Bjørn Forsman
Browse files

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.
parent 7e9344b1
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -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"
  '';