Skip to content

Commit c714a76

Browse files
committed
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.
1 parent 07ce7b2 commit c714a76

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • pkgs/applications/networking/browsers/chromium

pkgs/applications/networking/browsers/chromium/common.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
, libepoxy
3939
# postPatch:
4040
, glibc # gconv + locale
41+
# postFixup:
42+
, vulkan-loader
4143

4244
# Package customization:
4345
, cupsSupport ? true, cups ? null
@@ -341,10 +343,10 @@ let
341343
in lib.concatStringsSep "\n" commands;
342344

343345
postFixup = ''
344-
# Make sure that libGLESv2 is found by dlopen (if using EGL).
346+
# Make sure that libGLESv2 and libvulkan are found by dlopen.
345347
chromiumBinary="$libExecPath/$packageName"
346348
origRpath="$(patchelf --print-rpath "$chromiumBinary")"
347-
patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary"
349+
patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader ]}:$origRpath" "$chromiumBinary"
348350
'';
349351

350352
passthru = {

0 commit comments

Comments
 (0)