Unverified Commit ac719b73 authored by rewine's avatar rewine Committed by GitHub
Browse files

vivaldi: fix Vulkan ICD discovery (#509225)

parents f18921bf 52273152
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
  libdrm,
  libgbm,
  vulkan-loader,
  addDriverRunpath,
  nss,
  nspr,
  patchelf,
@@ -208,9 +209,13 @@ stdenv.mkDerivation rec {
        "$out"/opt/vivaldi/product_logo_''${d}.png \
        "$out"/share/icons/hicolor/''${d}x''${d}/apps/vivaldi.png
    done
    # replace bundled vulkan-loader with the NixOS-patched one to enable Vulkan ICD discovery
    rm $out/opt/vivaldi/libvulkan.so.1
    ln -s "${lib.getLib vulkan-loader}/lib/libvulkan.so.1" $out/opt/vivaldi/libvulkan.so.1

    wrapProgram "$out/bin/vivaldi" \
      --add-flags ${lib.escapeShellArg commandLineArgs} \
      --prefix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
      --prefix XDG_DATA_DIRS : "${addDriverRunpath.driverLink}/share:${gtk3}/share/gsettings-schemas/${gtk3.name}" \
      --prefix LD_LIBRARY_PATH : ${libPath} \
      --prefix PATH : ${coreutils}/bin \
      ''${qtWrapperArgs[@]}