-
Notifications
You must be signed in to change notification settings - Fork 13
/
flake.nix
55 lines (54 loc) · 1.4 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
49
50
51
52
53
54
55
{
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
naersk = {
url = "github:nmattia/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, fenix, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ fenix.overlays.default ];
pkgs = import nixpkgs {
inherit system overlays;
};
toolchain = fenix.packages.${system}.combine [
fenix.packages.${system}.stable.rustc
fenix.packages.${system}.stable.cargo
fenix.packages.${system}.targets.wasm32-unknown-unknown.stable.rust-std
];
buildInputs = with pkgs; [
# rust toolchain
toolchain
# rust native lib
pkg-config
openssl
# utility
just
binaryen
# bevy
gtk3
xorg.libX11
xorg.libxcb
xorg.libXcursor
xorg.libXrandr
xorg.libXi
alsa-lib
vulkan-loader
libxkbcommon
wayland
];
in with pkgs; {
devShell = mkShell {
buildInputs = buildInputs;
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
};
}
);
}