-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathdevshell.nix
More file actions
43 lines (39 loc) · 906 Bytes
/
devshell.nix
File metadata and controls
43 lines (39 loc) · 906 Bytes
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
{ pkgs, lib, inputs, system, ... }:
let
rust-toolchain = with inputs.rust.packages.${system};
let
msrvToolchain = toolchainOf {
channel = (lib.importTOML ./Cargo.toml).package.rust-version;
sha256 = "sha256-yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk=";
};
in
combine [
(msrvToolchain.withComponents [ "rustc" "cargo" "rust-src" "clippy" ])
latest.rustfmt
latest.rust-analyzer
];
in
pkgs.mkShell {
buildInputs = with pkgs; [
rust-toolchain
rust-bindgen
pkg-config
libarchive
# Required by the `static` feature (build.rs probes these via
# pkg-config when libarchive is linked statically).
libb2
lz4
zstd
xz
bzip2
zlib
libxml2
openssl
clang
llvmPackages.libclang
cargo-release
];
shellHook = ''
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
'';
}