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.
It is unclear why steam failed to build post-core-updates merge in Guix, with
errors like:
In guix/build/utils.scm:
761:4 0 (alist-cons-after patch-dot-desktop-files # #<procedur?> ?)
guix/build/utils.scm:761:4: In procedure alist-cons-after:
Throw to key `match-error' with args `("match" "no matching pattern" ())'.
The fix is to reorder and rename some phases which apparently don't exist.
* nongnu/packages/game-client.scm (steam-client)[arguments]<phases>: Reorder
the deletion of 'patch-dot-desktop-files to after 'patch-desktop-file (which
tried to add after this now deleted phases). Change the 'post-install phase
to add after 'install ('install-binaries doesn't exist').
* nongnu/packages/nvidia.scm (%nvidia-environment-variable-regexps): New
variable.
* nongnu/packages/game-client.scm (steam-nvidia-container)
(heroic-nvidia-container): Use it.
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
* nongnu/packages/game-client.scm (steam-nvidia-ld.so.conf)
(steam-nvidia-ld.so.cache): New variables.
(steam-nvidia-container,heroic-nvidia-container): Use them.
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
* nongnu/packages/game-client.scm (steam-nvidia-container-libs): New variable.
(steam-nvidia-container,heroic-nvidia-container): Use it.
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
* nongnu/packages/game-client.scm (steam-container-libs): New variable.
(steam-ld.so.conf,steam-container,heroic-container): Use it.
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Followup to 5d5d496 to do the same for heroic.
* nongnu/packages/game-client.scm (heroic-container)[link-files]: Link all of
'share' from heroic-client.
Previously, only the .desktop files from steam-client were shared with
steam-container, and thus only those were available directly when installing
the steam package. This would miss things like the icons (needed in some
cases for tray support, for example, in waybar). Update to share all of
'share' to provide a more complete package for the user.
* nongnu/packages/game-client.scm (steam-container)[link-files]: Link all of
'share' from steam-client.
* nongnu/packages/game-client.scm (heroic-client, heroic-extra-client-libs,
heroic-container, heroic-nvidia-container, heroic, heroic-nvidia): New
variables.
* nonguix/multi-arch-container.scm (make-container-wrapper): Preserve "^SSL_"
for heroic to use curl.
(make-internal-script): Add symlink for "/usr/share/glib-2.0".