Skip to content

Commit

Permalink
Merge pull request #262145 from nixdrin/chromium-libpci
Browse files Browse the repository at this point in the history
chromium: fix libpci GPU detection
  • Loading branch information
emilylange authored Oct 21, 2023
2 parents c2f9b2e + db3731b commit 9ef114e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,6 @@ let
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
device/udev_linux/udev?_loader.cc
'' + ''
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
gpu/config/gpu_info_collector_linux.cc
# Allow to put extensions into the system-path.
sed -i -e 's,/usr,/run/current-system/sw,' chrome/common/chrome_paths.cc
Expand Down Expand Up @@ -479,9 +476,10 @@ let

postFixup = ''
# Make sure that libGLESv2 and libvulkan are found by dlopen.
# 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 ]}:$origRpath" "$chromiumBinary"
patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader pciutils ]}:$origRpath" "$chromiumBinary"
'';

passthru = {
Expand Down

0 comments on commit 9ef114e

Please sign in to comment.