-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
41 lines (39 loc) · 1.18 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, ... }@inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ (import inputs.rust-overlay) ];
};
rust = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
rust
pkgs.lld
];
# bunch of dynamically linked libs for wgpu
LD_LIBRARY_PATH = with pkgs.xorg; with pkgs.lib.strings;
concatStrings (intersperse ":" [
"${libXcursor}/lib"
"${libX11}/lib"
"${pkgs.libxkbcommon}/lib"
"${libXxf86vm}/lib"
"${libXi}/lib"
"${libXrandr}/lib"
"${pkgs.vulkan-loader}/lib"
"${pkgs.stdenv.cc.cc.lib}/lib64"
"${pkgs.stdenv.cc.cc.lib}/lib64"
]);
};
});
}