chromium: fix vulkan linking

libvulkan is dlopen'd but is missing from the linker search path.
We probably should be using the libvulkan (and libGLESv2) provided by
chromium, but using vulkan-loader's libvulkan.so.1 is a tried-and-true
workaround.

Fixes #150398.
This commit is contained in:
William Sengir
2023-02-15 23:12:52 -07:00
parent 07ce7b2f5b
commit c714a76c04
@@ -38,6 +38,8 @@
, libepoxy
# postPatch:
, glibc # gconv + locale
# postFixup:
, vulkan-loader
# Package customization:
, cupsSupport ? true, cups ? null
@@ -341,10 +343,10 @@ let
in lib.concatStringsSep "\n" commands;
postFixup = ''
# Make sure that libGLESv2 is found by dlopen (if using EGL).
# Make sure that libGLESv2 and libvulkan are found by dlopen.
chromiumBinary="$libExecPath/$packageName"
origRpath="$(patchelf --print-rpath "$chromiumBinary")"
patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary"
patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader ]}:$origRpath" "$chromiumBinary"
'';
passthru = {