1{
2 mkShell,
3 makeFontsConf,
4 pkgsCross,
5
6 zed-editor,
7
8 rust-analyzer,
9 rustup,
10 cargo-nextest,
11 cargo-hakari,
12 cargo-machete,
13 cargo-zigbuild,
14 nixfmt-rfc-style,
15 protobuf,
16 nodejs_22,
17 zig,
18
19 livekit,
20}:
21(mkShell.override { inherit (zed-editor) stdenv; }) {
22 inputsFrom = [ zed-editor ];
23 packages = [
24 rust-analyzer
25 rustup
26 cargo-nextest
27 cargo-hakari
28 cargo-machete
29 cargo-zigbuild
30 nixfmt-rfc-style
31 # TODO: package protobuf-language-server for editing zed.proto
32 # TODO: add other tools used in our scripts
33
34 # `build.nix` adds this to the `zed-editor` wrapper (see `postFixup`)
35 # we'll just put it on `$PATH`:
36 nodejs_22
37 zig
38
39 livekit
40 ];
41
42 env =
43 let
44 baseEnvs =
45 (zed-editor.overrideAttrs (attrs: {
46 passthru = { inherit (attrs) env; };
47 })).env; # exfil `env`; it's not in drvAttrs
48 in
49 (removeAttrs baseEnvs [
50 "LK_CUSTOM_WEBRTC" # download the staticlib during the build as usual
51 "ZED_UPDATE_EXPLANATION" # allow auto-updates
52 "CARGO_PROFILE" # let you specify the profile
53 "TARGET_DIR"
54 ])
55 // {
56 # note: different than `$FONTCONFIG_FILE` in `build.nix` – this refers to relative paths
57 # outside the nix store instead of to `$src`
58 FONTCONFIG_FILE = makeFontsConf {
59 fontDirectories = [
60 "./assets/fonts/lilex"
61 "./assets/fonts/ibm-plex-sans"
62 ];
63 };
64 PROTOC = "${protobuf}/bin/protoc";
65 ZED_ZSTD_MUSL_LIB = "${pkgsCross.musl64.pkgsStatic.zstd.out}/lib";
66 };
67}