-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (44 loc) · 1.21 KB
/
flake.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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
};
outputs = { self, nixpkgs, utils, fenix }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
toolchain = with fenix.packages.${system};
combine (with complete; [
rustc
rust-src
cargo
clippy
rustfmt
rust-analyzer
]);
in
{
devShell = with pkgs; mkShell rec {
buildInputs = [
toolchain
cargo-criterion
rnix-lsp
vulkan-loader
vulkan-validation-layers
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
gnuplot
mdbook
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d/";
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
RUST_LOG = "warn";
RUST_BACKTRACE = 1;
};
}
);
}