-
Notifications
You must be signed in to change notification settings - Fork 22
/
shell.nix
42 lines (42 loc) · 877 Bytes
/
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
{
pkgs ? import <nixpkgs> { },
}:
let
llvm = pkgs.llvmPackages_latest;
in
pkgs.mkShellNoCC {
shellHook = ''
${pkgs.pre-commit}/bin/pre-commit install --install-hooks --overwrite
export PKG_CONFIG_PATH="${
pkgs.lib.makeSearchPath "lib/pkgconfig" [
pkgs.dbus.dev
pkgs.systemdMinimal.dev
]
}"
export LIBCLANG_PATH="${llvm.libclang}/lib"
# for rust-analyzer
export RUST_SRC_PATH="${pkgs.rustPlatform.rustLibSrc}"
export RUST_BACKTRACE=1
export RUSTFLAGS="${
pkgs.lib.concatStringsSep " " [
"-L${pkgs.lib.getLib pkgs.systemdMinimal}/lib"
"-lsystemd"
]
}"
'';
buildInputs = with pkgs; [
dbus
];
nativeBuildInputs = with pkgs; [
llvm.clang
pkg-config
rustc
cargo
# Formatting
pre-commit
treefmt
nixfmt-rfc-style
rustfmt
clippy
];
}