forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
55 lines (51 loc) · 1.35 KB
/
shell.nix
File metadata and controls
55 lines (51 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
mkShell,
makeFontsConf,
zed-editor,
rust-analyzer,
cargo-nextest,
cargo-hakari,
cargo-machete,
nixfmt-rfc-style,
protobuf,
nodejs_22,
}:
(mkShell.override { inherit (zed-editor) stdenv; }) {
inputsFrom = [ zed-editor ];
packages = [
rust-analyzer
cargo-nextest
cargo-hakari
cargo-machete
nixfmt-rfc-style
# TODO: package protobuf-language-server for editing zed.proto
# TODO: add other tools used in our scripts
# `build.nix` adds this to the `zed-editor` wrapper (see `postFixup`)
# we'll just put it on `$PATH`:
nodejs_22
];
env =
let
baseEnvs =
(zed-editor.overrideAttrs (attrs: {
passthru = { inherit (attrs) env; };
})).env; # exfil `env`; it's not in drvAttrs
in
(removeAttrs baseEnvs [
"LK_CUSTOM_WEBRTC" # download the staticlib during the build as usual
"ZED_UPDATE_EXPLANATION" # allow auto-updates
"CARGO_PROFILE" # let you specify the profile
"TARGET_DIR"
])
// {
# note: different than `$FONTCONFIG_FILE` in `build.nix` – this refers to relative paths
# outside the nix store instead of to `$src`
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [
"./assets/fonts/plex-mono"
"./assets/fonts/plex-sans"
];
};
PROTOC = "${protobuf}/bin/protoc";
};
}