diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0979958053d..4c30766fb1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -432,8 +432,6 @@ jobs: ${{ github.workspace }}\target\artifacts\Graphite\chrome_elf.dll ${{ github.workspace }}\target\artifacts\Graphite\vulkan-1.dll ${{ github.workspace }}\target\artifacts\Graphite\dxcompiler.dll - ${{ github.workspace }}\target\artifacts\Graphite\libEGL.dll - ${{ github.workspace }}\target\artifacts\Graphite\libGLESv2.dll ${{ github.workspace }}\target\artifacts\Graphite\vk_swiftshader.dll file-digest: SHA256 timestamp-rfc3161: http://timestamp.acs.microsoft.com diff --git a/.nix/pkgs/graphite-cef.nix b/.nix/pkgs/graphite-cef.nix index 359f77bb48f..d892a0cc306 100644 --- a/.nix/pkgs/graphite-cef.nix +++ b/.nix/pkgs/graphite-cef.nix @@ -1,10 +1,10 @@ { pkgs, ... }: let - version = "151.3.24+g2384915+chromium-151.0.7922.174"; + version = "156.0.8+g426920c+chromium-156.0.8078.48"; hashes = { - aarch64-linux = "sha256-R5ZbnDallYvdbW/bP+M2DzjRfWWRTvY2q63hSIHNxZs="; - x86_64-linux = "sha256-21PEP9rOi37krw8AUSARbWlzqp2Ot3AsBhe635voaE4="; + aarch64-linux = "sha256-txaNkuJmxyg5zYv5/G1MQ57b19xcEs1+XEw/2IqVSHY="; + x86_64-linux = "sha256-3FisWT1Gwh7ixdULjbVzD6zvpCAYOODJ8961k3K/tPo="; }; selectSystem = @@ -19,14 +19,70 @@ let } }_minimal.tar.bz2"; + gl_rpath = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]; + + rpath = pkgs.lib.makeLibraryPath [ + pkgs.glib + pkgs.nss + pkgs.nspr + pkgs.atk + pkgs.at-spi2-atk + pkgs.libdrm + pkgs.expat + pkgs.libxkbcommon + pkgs.libgbm + pkgs.gtk3 + pkgs.pango + pkgs.cairo + pkgs.alsa-lib + pkgs.dbus + pkgs.at-spi2-core + pkgs.cups + pkgs.libGL + pkgs.udev + pkgs.systemdLibs + pkgs.libxcb + pkgs.libx11 + pkgs.libxcomposite + pkgs.libxdamage + pkgs.libxext + pkgs.libxfixes + pkgs.libxrandr + pkgs.libxshmfence + ]; +in +pkgs.stdenv.mkDerivation { + pname = "cef-binary"; + version = builtins.head (builtins.split "\\+" version); + src = pkgs.fetchurl { inherit url; hash = selectSystem hashes; }; -in -pkgs.cef-binary.overrideAttrs { - version = builtins.head (builtins.split "\\+" version); - inherit src; + + dontStrip = true; + + dontPatchELF = true; + + installPhase = '' + runHook preInstall + + sed 's/-O0/-O2/' -i cmake/cef_variables.cmake + patchelf --set-rpath "${rpath}" --set-interpreter "${pkgs.stdenv.cc.bintools.dynamicLinker}" Release/chrome-sandbox + patchelf --add-needed libudev.so --set-rpath "${rpath}" Release/libcef.so + if [ -e Release/libEGL.so ]; then + patchelf --set-rpath "${gl_rpath}" Release/libEGL.so + fi + if [ -e Release/libGLESv2.so ]; then + patchelf --add-needed libGL.so.1 --set-rpath "${gl_rpath}" Release/libGLESv2.so + fi + patchelf --set-rpath "${gl_rpath}" Release/libvk_swiftshader.so + patchelf --set-rpath "${gl_rpath}" Release/libvulkan.so.1 + cp --recursive . $out + + runHook postInstall + ''; + postInstall = '' rm -r $out/* $out/.* || true strip ./Release/*.so* diff --git a/Cargo.lock b/Cargo.lock index f75eda47ec3..6809d59123e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -595,8 +595,9 @@ dependencies = [ [[package]] name = "cef" -version = "151.8.0+151.3.24" -source = "git+https://github.com/timon-schelling/cef-rs.git?branch=graphite-151#35712dc3948628245cf9810eadd045d9435442e8" +version = "156.1.0+156.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb823e721b3ea203f4635e71532db2b010696c074518eb4f6154fd7f47fc6fcb" dependencies = [ "anyhow", "cargo_metadata 0.23.1", @@ -614,10 +615,12 @@ dependencies = [ [[package]] name = "cef-dll-sys" -version = "151.8.0+151.3.24" -source = "git+https://github.com/timon-schelling/cef-rs.git?branch=graphite-151#35712dc3948628245cf9810eadd045d9435442e8" +version = "156.1.0+156.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33767687af821e69e1c90667567dd98db581e57f268fa532ef358040c91f9c86" dependencies = [ "anyhow", + "cc", "cmake", "download-cef", "serde_json", @@ -1326,8 +1329,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "download-cef" -version = "2.3.2" -source = "git+https://github.com/timon-schelling/cef-rs.git?branch=graphite-151#35712dc3948628245cf9810eadd045d9435442e8" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ee509499d14dc47da5f824e4bb1bd558ceb259adc5475956265d48787a80da" dependencies = [ "bzip2", "clap", diff --git a/Cargo.toml b/Cargo.toml index cbe6f0fe993..2e9cd74a221 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -238,8 +238,8 @@ gungraun = { version = "0.18" } ndarray = "0.16" strum = { version = "0.27", features = ["derive"] } dirs = "6.0" -cef = "151" -cef-dll-sys = "151" +cef = "156" +cef-dll-sys = "156" include_dir = "0.7" tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing = "0.1" @@ -283,5 +283,3 @@ debug = true [patch.crates-io] winit = { git = "https://github.com/timon-schelling/winit", branch = "graphite" } rfd = { git = "https://github.com/timon-schelling/rfd.git", branch = "graphite" } # TODO: Remove this once https://github.com/PolyMeilex/rfd/pull/317 is merged and released -cef = { git = "https://github.com/timon-schelling/cef-rs.git", branch = "graphite-151" } -cef-dll-sys = { git = "https://github.com/timon-schelling/cef-rs.git", branch = "graphite-151" }