-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
49 lines (42 loc) · 1.03 KB
/
shell.nix
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
let
mozilla =
builtins.fetchGit {
name = "nixpkgs-mozilla";
url = https://github.com/mozilla/nixpkgs-mozilla/;
};
nixPackages =
import <nixpkgs> {
overlays = [
(import mozilla)
];
};
# NOTE: this is the last version before the layout of the source
# code changed, pinning to this version for now, because the
# version of rustracer in nixpkgs doesn't have the patch to support
# the new layout
rustChannel = nixPackages.rustChannelOf { channel = "1.46.0"; };
rust =
(rustChannel.rust.override {
extensions = [
"rust-src"
"rls-preview"
"rust-analysis"
"rustfmt-preview"
"clippy-preview"
];
});
in
with nixPackages;
mkShell {
buildInputs = with pkgs; [
rust
rustracer
nodejs
(sqlite.override {
inherit readline ncurses;
interactive = true;
})
];
RUST_SRC_PATH = "${rustChannel.rust-src}/lib/rustlib/src/rust/src";
RACER_PATH = "${rustracer}/bin/racer";
}