Unverified Commit 9ef114e1 authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #262145 from nixdrin/chromium-libpci

chromium: fix libpci GPU detection
parents c2f9b2e6 db3731b8
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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

@@ -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 = {