Skip to content

Commit

Permalink
chromium: fix vulkan linking
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sengir committed Feb 16, 2023
1 parent 07ce7b2 commit c714a76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
, libepoxy
# postPatch:
, glibc # gconv + locale
# postFixup:
, vulkan-loader

# Package customization:
, cupsSupport ? true, cups ? null
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit c714a76

Please sign in to comment.