forked from viperML/nh
-
Notifications
You must be signed in to change notification settings - Fork 4
/
devshell.nix
52 lines (48 loc) · 1.08 KB
/
devshell.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
50
51
52
{ inputs, ... }:
{
perSystem =
{ pkgs, lib, ... }:
{
devshells.default = {
imports = [
"${inputs.devshell}/extra/language/c.nix"
# "${devshell}/extra/language/rust.nix"
];
commands = with pkgs; [
{
package = cargo;
category = "rust";
}
];
packages =
with pkgs;
[
cargo
rustc
rust-analyzer-unwrapped
rustfmt
clippy
nvd
nix-output-monitor
]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
env = [
{
name = "NH_NOM";
value = "1";
}
{
name = "RUST_LOG";
value = "nh=trace";
}
{
name = "RUST_SRC_PATH";
value = "${pkgs.rustPlatform.rustLibSrc}";
}
];
language.c = {
libraries = lib.optional pkgs.stdenv.isDarwin pkgs.libiconv;
};
};
};
}