Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
70 changes: 63 additions & 7 deletions .nix/pkgs/graphite-cef.nix
Original file line number Diff line number Diff line change
@@ -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 =
Expand All @@ -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*
Expand Down
16 changes: 10 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" }
Loading