-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
83 lines (75 loc) · 1.97 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
inputs = {
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
flake-utils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
};
fenix = {
type = "github";
owner = "nix-community";
repo = "fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.fenix.overlays.default ];
};
in {
devShell = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
cmake
pkg-config
(fenix.combine [
(fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
fenix.targets.wasm32-unknown-unknown.stable.rust-std
fenix.targets.wasm32-wasip1.stable.rust-std
])
rust-analyzer
wasm-bindgen-cli
trunk
wasmtime
];
buildInputs = with pkgs; [
atk
cairo
freetype
gdk-pixbuf
glib
gtk3
librsvg
pango
vulkan-loader
libxkbcommon
libGL
# WINIT_UNIX_BACKEND=wayland
wayland
# WINIT_UNIX_BACKEND=x11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libX11
];
LD_LIBRARY_PATH = inputs.nixpkgs.lib.makeLibraryPath buildInputs;
XDG_DATA_DIRS =
"${pkgs.gtk3}/share/gsettings-schemas/gtk+3-${pkgs.gtk3.version}:"
+ "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-${pkgs.gsettings-desktop-schemas.version}";
};
});
}