remote: Support building x86_64-linux-musl proxy in nix-darwin (#41291)
This change adds two things to our remote server build
process:
1. It now checks if all required tooling is installed before using it or installing it on demand. This includes checks for `rustup` and `cargo-zigbuild` in your `PATH`.
2. Next, if `ZED_BUILD_REMOTE_SERVER` contains `musl` and `ZED_ZSTD_MUSL_LIB`
is set, we will pass its value (the path) to `cargo-zigbuild` as `-C
link-arg=-L{path}`.
Release Notes:
- N/A
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
{
|
||||
mkShell,
|
||||
makeFontsConf,
|
||||
pkgsCross,
|
||||
|
||||
zed-editor,
|
||||
|
||||
rust-analyzer,
|
||||
rustup,
|
||||
cargo-nextest,
|
||||
cargo-hakari,
|
||||
cargo-machete,
|
||||
cargo-zigbuild,
|
||||
nixfmt-rfc-style,
|
||||
protobuf,
|
||||
nodejs_22,
|
||||
zig,
|
||||
}:
|
||||
(mkShell.override { inherit (zed-editor) stdenv; }) {
|
||||
inputsFrom = [ zed-editor ];
|
||||
packages = [
|
||||
rust-analyzer
|
||||
rustup
|
||||
cargo-nextest
|
||||
cargo-hakari
|
||||
cargo-machete
|
||||
cargo-zigbuild
|
||||
nixfmt-rfc-style
|
||||
# TODO: package protobuf-language-server for editing zed.proto
|
||||
# TODO: add other tools used in our scripts
|
||||
@@ -26,6 +32,7 @@
|
||||
# `build.nix` adds this to the `zed-editor` wrapper (see `postFixup`)
|
||||
# we'll just put it on `$PATH`:
|
||||
nodejs_22
|
||||
zig
|
||||
];
|
||||
|
||||
env =
|
||||
@@ -51,5 +58,6 @@
|
||||
];
|
||||
};
|
||||
PROTOC = "${protobuf}/bin/protoc";
|
||||
ZED_ZSTD_MUSL_LIB = "${pkgsCross.musl64.pkgsStatic.zstd.out}/lib";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user