-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
82 lines (70 loc) · 1.95 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
nixpkgs-mozilla = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
};
};
outputs = { self, nixpkgs, utils, nixpkgs-mozilla, }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import nixpkgs-mozilla)
];
};
toolchain =
(pkgs.rustChannelOf {
date = "2023-11-11";
channel = "nightly";
sha256 = "sha256-0d/UxN6sekF+iQtebQl6jj/AQiT18Uag3CKbsCxc1E0=";
})
.rust;
nativeLibPath = with pkgs; lib.makeLibraryPath [
libGL
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
glib
gsettings-desktop-schemas
];
in
{
devShell = with pkgs; mkShell {
buildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux (with pkgs; [
# Rust deps
toolchain
rust-analyzer
pre-commit
pkg-config
# Audio
alsa-lib
# Controller support
udev
# Graphics (generic)
vulkan-loader
xorg.libxcb
# GTK
gtk3-x11.dev
# Trunk for WASM serving
trunk
# Python needed for Py03
python3
# Gtk needed for GSettings Schemas
gtk3
]);
LD_LIBRARY_PATH = nativeLibPath;
RUST_SRC_PATH = rustPlatform.rustLibSrc;
# Without the shellHook, there's no access to the GSettings Schemas
shellHook = ''
export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH:${hicolor-icon-theme}/share:${gnome3.adwaita-icon-theme}/share
'';
};
});
}