Skip to content

Commit 53b1078

Browse files
committed
build: Rework build setup
- mv Cargo workspace up to top_srcdir - replaced ng-bindgen with emacs/build.rs - check rustc/cargo using configure, remove rustup checking - configure crates/webrender directly from configure.ac file
1 parent 174b145 commit 53b1078

File tree

2 files changed

+62
-29
lines changed

2 files changed

+62
-29
lines changed

flake.lock

Lines changed: 57 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@
147147
};
148148

149149
emacsngSrc = prev.rustPlatform.fetchCargoTarball {
150-
src = emacsng-source + "/rust_src";
150+
src = emacsng-source;
151151
cargoUpdateHook =
152152
''
153-
sed -e 's/@CARGO_.*@//' Cargo.toml.in > Cargo.toml
154-
sed -i 's|@WEBRENDER_DEFAULT_FEATURES@|"webrender"|' Cargo.toml
153+
sed -e 's/@CARGO_.*@//' Cargo.in > Cargo.toml
154+
sed -e 's/@WEBRENDER_.*@//' rust_src/crates/webrender/Cargo.in > rust_src/crates/webrender/Cargo.toml
155155
''
156156
+ doVersionedUpdate;
157157
name = "emacsngSrc";
@@ -198,7 +198,7 @@
198198
librusty_v8 = prev.callPackage ./nix/librusty_v8.nix {};
199199

200200
emacsng = with prev; let
201-
withWebrender = false;
201+
withWebrender = true;
202202
in
203203
(
204204
final.emacsGcc.override
@@ -289,7 +289,7 @@
289289
+ ''
290290
_librusty_v8_setup() {
291291
for v in "$@"; do
292-
install -D ${final.librusty_v8} "rust_src/target/$v/gn_out/obj/librusty_v8.a"
292+
install -D ${final.librusty_v8} "target/$v/gn_out/obj/librusty_v8.a"
293293
done
294294
}
295295
_librusty_v8_setup "debug" "release" "${arch}/release"

0 commit comments

Comments
 (0)