-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdevenv.nix
More file actions
73 lines (67 loc) · 1.5 KB
/
devenv.nix
File metadata and controls
73 lines (67 loc) · 1.5 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ pkgs, lib, inputs, config, ... }:
{
config = {
packages = with pkgs; [
cmake
just
zlib
libxml2
ncurses
rust-cbindgen
graphviz
graph-easy
libffi
cargo-expand
];
enterShell = ''
eval "$(just --completions bash)"
export LD_LIBRARY_PATH="${lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
'';
env = {
LIBCLANG_PATH = "${pkgs.libclang.lib}";
};
languages.python = {
enable = true;
uv.enable = true;
uv.sync.enable = true;
venv.enable = true;
};
languages.rust = {
enable = true;
rustflags = "-L${config.env.DEVENV_PROFILE}/lib";
components = [ "rustc" "cargo" "clippy" "rustfmt" "rust-analyzer" ];
};
git-hooks.hooks = {
ruff = {
enable = true;
args = ["--config=pyproject.toml"];
pass_filenames = false;
};
ruff-format = {
enable = true;
args = ["--config=pyproject.toml"];
pass_filenames = false;
};
clippy = {
enable = true;
settings = {
denyWarnings = true;
};
};
cargo-check = {
enable = true;
};
rustfmt = {
enable = true;
};
mypy = {
enable = true;
args = ["--config=pyproject.toml"];
extraPackages = with pkgs.python3Packages; [
types-pyyaml
];
excludes = ["selene-sim/python/tests"];
};
};
};
}