-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
56 lines (49 loc) · 1.13 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ pkgs ? import <nixpkgs> { config.allowUnfree = true; } }:
with pkgs;
let
inputs = [
pkg-config
openssl
nixd
nixpkgs-fmt
rustc
cargo
rustc.llvmPackages.llvm
cargo-llvm-cov
gcc
rustfmt
clippy
];
system = {
"aarch64-linux" = "linux";
"x86_64-linux" = "linux";
"aarch64-darwin" = "darwin";
"x86_64-darwin" = "darwin";
}.${pkgs.stdenv.system};
systemInputs = {
"darwin" = with darwin.apple_sdk.frameworks; [
libiconv
CoreFoundation
SystemConfiguration
];
"linux" = [ ];
}.${system};
buildInputs = inputs ++ systemInputs;
in
{
default = pkgs.mkShell {
packages = [ llvmPackages.bintools ];
inherit buildInputs;
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
LLVM_COV = "${pkgs.rustc.llvmPackages.llvm}/bin/llvm-cov";
LLVM_PROFDATA = "${pkgs.rustc.llvmPackages.llvm}/bin/llvm-profdata";
RUST_LOG = "trace";
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${ with pkgs; lib.makeLibraryPath [
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
] }";
};
}