chromium: add libglvnd to rpath

This should fix issues like
- https://github.com/NixOS/nixpkgs/pull/249853
- https://github.com/NixOS/nixpkgs/issues/268490
for all chromium and all electron apps under Wayland.
This commit is contained in:
Sophie Tauchert 2023-11-20 11:29:59 +01:00
parent 85f1ba3e51
commit c475ac3248
No known key found for this signature in database
GPG Key ID: 52701DE5F5F51125

View File

@ -47,6 +47,7 @@
, glibc # gconv + locale
# postFixup:
, vulkan-loader
, libglvnd
# Package customization:
, cupsSupport ? true, cups ? null
@ -479,7 +480,7 @@ let
# libpci (from pciutils) is needed by dlopen in angle/src/gpu_info_util/SystemInfo_libpci.cpp
chromiumBinary="$libExecPath/$packageName"
origRpath="$(patchelf --print-rpath "$chromiumBinary")"
patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader pciutils ]}:$origRpath" "$chromiumBinary"
patchelf --set-rpath "${lib.makeLibraryPath [ libGL libglvnd vulkan-loader pciutils ]}:$origRpath" "$chromiumBinary"
'';
passthru = {