Skip to content

Commit

Permalink
build: Rework build setup
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
declantsien committed Jan 3, 2023
1 parent 174b145 commit 53b1078
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 29 deletions.
81 changes: 57 additions & 24 deletions flake.lock

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

10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@
};

emacsngSrc = prev.rustPlatform.fetchCargoTarball {
src = emacsng-source + "/rust_src";
src = emacsng-source;
cargoUpdateHook =
''
sed -e 's/@CARGO_.*@//' Cargo.toml.in > Cargo.toml
sed -i 's|@WEBRENDER_DEFAULT_FEATURES@|"webrender"|' Cargo.toml
sed -e 's/@CARGO_.*@//' Cargo.in > Cargo.toml
sed -e 's/@WEBRENDER_.*@//' rust_src/crates/webrender/Cargo.in > rust_src/crates/webrender/Cargo.toml
''
+ doVersionedUpdate;
name = "emacsngSrc";
Expand Down Expand Up @@ -198,7 +198,7 @@
librusty_v8 = prev.callPackage ./nix/librusty_v8.nix {};

emacsng = with prev; let
withWebrender = false;
withWebrender = true;
in
(
final.emacsGcc.override
Expand Down Expand Up @@ -289,7 +289,7 @@
+ ''
_librusty_v8_setup() {
for v in "$@"; do
install -D ${final.librusty_v8} "rust_src/target/$v/gn_out/obj/librusty_v8.a"
install -D ${final.librusty_v8} "target/$v/gn_out/obj/librusty_v8.a"
done
}
_librusty_v8_setup "debug" "release" "${arch}/release"
Expand Down

0 comments on commit 53b1078

Please sign in to comment.