Skip to content

Commit 5e4d5d1

Browse files
Implement basic cef based desktop app
1 parent 03751df commit 5e4d5d1

21 files changed

+2682
-2658
lines changed

.nix/flake.nix

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,39 @@
4242
extensions = [ "rust-src" "rust-analyzer" "clippy" "cargo" ];
4343
};
4444

45+
libcef = pkgs.libcef.overrideAttrs (finalAttrs: previousAttrs: {
46+
version = "138.0.26";
47+
gitRevision = "84f2d27";
48+
chromiumVersion = "138.0.7204.158";
49+
srcHash = "sha256-d9jQJX7rgdoHfROD3zmOdMSesRdKE3slB5ZV+U2wlbQ=";
50+
51+
__intentionallyOverridingVersion = true;
52+
53+
postInstall = ''
54+
strip $out/lib/*
55+
'';
56+
});
57+
58+
libcefPath = pkgs.runCommand "libcef-path" {} ''
59+
mkdir -p $out
60+
61+
ln -s ${libcef}/include $out/include
62+
find ${libcef}/lib -type f -name "*" -exec ln -s {} $out/ \;
63+
find ${libcef}/libexec -type f -name "*" -exec ln -s {} $out/ \;
64+
cp -r ${libcef}/share/cef/* $out/
65+
66+
echo '${builtins.toJSON {
67+
type = "minimal";
68+
name = builtins.baseNameOf libcef.src.url;
69+
sha1 = "";
70+
}}' > $out/archive.json
71+
'';
72+
4573
# Shared build inputs - system libraries that need to be in LD_LIBRARY_PATH
4674
buildInputs = with pkgs; [
4775
# System libraries
76+
wayland
77+
wayland.dev
4878
openssl
4979
vulkan-loader
5080
mesa
@@ -85,8 +115,8 @@
85115
devShells.default = pkgs.mkShell {
86116
packages = buildInputs ++ buildTools ++ devTools;
87117

88-
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
89-
GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/";
118+
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}:/${libcefPath}";
119+
CEF_PATH = libcefPath;
90120
XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
91121

92122
shellHook = ''

0 commit comments

Comments
 (0)