-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (45 loc) · 1.15 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
{
description = "A devShell example";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
oldpkgs.url = "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba";
};
outputs = {
self,
nixpkgs,
oldpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
pkgs-old = import oldpkgs {
inherit system;
};
in {
devShells.default = with pkgs;
mkShell rec {
nativeBuildInputs = [
rust-bin.stable.latest.default
pkgs-old.rust-analyzer
];
buildInputs = [
pkg-config
libGL
wayland
libxkbcommon
];
LD_LIBRARY_PATH = builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
shellHook = ''
'';
};
}
);
}