From e65677969e7ba6afd6c327379e24da0bed2f3adc Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Sun, 2 Feb 2025 17:53:09 -0500 Subject: nonguix: binary-build-system: Use add-rpath instead of set-rpath. Fixes #369. Previously we were using "patchelf --set-rpath" in binary-build-system for binaries to find dependencies in Guix. However, this will override any previous setting, including if "$ORIGIN" was in RUNPATH. For Electron applications specifically (like signal-desktop and heroic), bundled libraries were not found without wrapping with LD_LIBRARY_PATH. While this does work, it is not ideal and led to issues in child processes that inherit LD_LIBRARY_PATH, namely breaking games using Wine/Proton in Heroic. A possible consequence of this commit is that Guix added paths to RUNPATH are after what was originally set, perhaps leading to library loading/compatibility issues. However, we always try to replace all needed libraries with Guix packages (just that Electron applications seem to require bundled libraries in $ORIGIN). * nonguix/build/binary-build-system.scm (patchelf): Use add-rpath instead of set-rpath. * nongnu/packages/game-client.scm (heroic-client)[arguments]<#:phases>: Remove 'wrap-where-patchelf-does-not-work phase as it is no longer needed (needed libraries are found with $ORIGIN preserved in RUNPATH). * nongnu/packages/messaging.scm (element-desktop, signal-desktop): Likewise. * nongnu/packages/editors.scm (vscodium): Likewise. --- nongnu/packages/messaging.scm | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'nongnu/packages/messaging.scm') diff --git a/nongnu/packages/messaging.scm b/nongnu/packages/messaging.scm index 4275e2e..4af8e6f 100644 --- a/nongnu/packages/messaging.scm +++ b/nongnu/packages/messaging.scm @@ -69,15 +69,7 @@ (lambda _ (mkdir-p (string-append #$output "/bin")) (symlink (string-append #$output "/lib/Element/element-desktop") - (string-append #$output "/bin/element-desktop")))) - (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work - (lambda _ - (wrap-program (string-append #$output "/lib/Element/element-desktop") - `("LD_LIBRARY_PATH" ":" prefix - (,(string-join - (list - (string-append #$output "/lib/Element")) - ":"))))))))) + (string-append #$output "/bin/element-desktop"))))))) (home-page "https://github.com/vector-im/element-desktop") (synopsis "Matrix collaboration client for desktop") (description "Element Desktop is a Matrix client for desktop with Element Web at @@ -123,15 +115,7 @@ its core.") (lambda _ (mkdir-p (string-append #$output "/bin")) (symlink (string-append #$output "/lib/Signal/signal-desktop") - (string-append #$output "/bin/signal-desktop")))) - (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work - (lambda _ - (wrap-program (string-append #$output "/lib/Signal/signal-desktop") - `("LD_LIBRARY_PATH" ":" prefix - (,(string-join - (list - (string-append #$output "/lib/Signal")) - ":"))))))))) + (string-append #$output "/bin/signal-desktop"))))))) (home-page "https://signal.org/") (synopsis "Private messenger using the Signal protocol") (description "Signal Desktop is an Electron application that links with Signal on Android -- cgit v1.2.3