|
36 | 36 | pkgs-unstable = import nixpkgs-unstable { |
37 | 37 | inherit system overlays; |
38 | 38 | }; |
39 | | - |
| 39 | + |
40 | 40 | rustc-wasm = pkgs.rust-bin.stable.latest.default.override { |
41 | 41 | targets = [ "wasm32-unknown-unknown" ]; |
42 | 42 | extensions = [ "rust-src" "rust-analyzer" "clippy" "cargo" ]; |
43 | 43 | }; |
44 | 44 |
|
| 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 | + |
45 | 73 | # Shared build inputs - system libraries that need to be in LD_LIBRARY_PATH |
46 | 74 | buildInputs = with pkgs; [ |
47 | 75 | # System libraries |
| 76 | + wayland |
| 77 | + wayland.dev |
48 | 78 | openssl |
49 | 79 | vulkan-loader |
50 | 80 | mesa |
51 | 81 | libraw |
52 | | - |
53 | | - |
54 | | - # Tauri dependencies: keep in sync with https://v2.tauri.app/start/prerequisites/#system-dependencies (under the NixOS tab) |
55 | | - at-spi2-atk |
56 | | - atkmm |
57 | | - cairo |
58 | | - gdk-pixbuf |
59 | | - glib |
60 | | - gtk3 |
61 | | - harfbuzz |
62 | | - librsvg |
63 | | - libsoup_3 |
64 | | - pango |
65 | | - webkitgtk_4_1 |
66 | | - openssl |
| 82 | + libGL |
67 | 83 | ]; |
68 | 84 |
|
69 | 85 | # Development tools that don't need to be in LD_LIBRARY_PATH |
|
88 | 104 | cargo-watch |
89 | 105 | cargo-nextest |
90 | 106 | cargo-expand |
91 | | - |
| 107 | + |
92 | 108 | # Profiling tools |
93 | 109 | gnuplot |
94 | 110 | samply |
95 | 111 | cargo-flamegraph |
96 | | - |
97 | 112 | ]; |
98 | 113 | in |
99 | 114 | { |
100 | 115 | # Development shell configuration |
101 | 116 | devShells.default = pkgs.mkShell { |
102 | 117 | packages = buildInputs ++ buildTools ++ devTools; |
103 | 118 |
|
104 | | - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; |
105 | | - GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/"; |
| 119 | + LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}:${libcefPath}"; |
| 120 | + CEF_PATH = libcefPath; |
106 | 121 | 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"; |
107 | | - |
108 | 122 |
|
109 | 123 | shellHook = '' |
110 | 124 | alias cargo='mold --run cargo' |
|
0 commit comments