google-chrome: add rpath for libGLESv2.so as well

This is needed to make sure that ANGLE's libGLESv2.so can find libGL and libvulkan
Like 27e30d177e/pkgs/development/tools/electron/binary/generic.nix (L136-L139)
and 27e30d177e/pkgs/applications/networking/browsers/chromium/common.nix (L562-564)

Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
(cherry picked from commit 2b58c0b4b2)
This commit is contained in:
John Titor
2024-10-04 00:28:04 +05:30
committed by github-actions[bot]
parent 9c6ca214ba
commit a136b63ddf

View File

@@ -252,6 +252,9 @@ let
--add-flags "--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'" \
--add-flags ${lib.escapeShellArg commandLineArgs}
# Make sure that libGL and libvulkan are found by ANGLE libGLESv2.so
patchelf --set-rpath $rpath $out/share/google/$appname/lib*GL*
for elf in $out/share/google/$appname/{chrome,chrome-sandbox,chrome_crashpad_handler}; do
patchelf --set-rpath $rpath $elf
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $elf