-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathshell.nix
More file actions
70 lines (61 loc) · 1.16 KB
/
shell.nix
File metadata and controls
70 lines (61 loc) · 1.16 KB
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
{
pkgs ? import <nixpkgs> { },
}:
let
libraries = with pkgs; [
pcsclite
hidapi
mesa
udev
libxkbcommon
vulkan-loader
wayland
libglvnd
wayland-protocols
libunwind
libdrm
libx11
libxcursor
libxi
libxrandr
libxcb
freetype
];
packages = with pkgs; [
curl
wget
pkg-config
dbus
openssl_3
librsvg
git
# Development tools
rustc
clippy
rustfmt
rust-analyzer
rustPlatform.rustLibSrc
mold
cargo
# GPUI
libxkbcommon
# Hardware
pcsclite
hidapi
udev
];
in
pkgs.mkShell {
buildInputs = packages;
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH:$XDG_DATA_DIRS
export RUSTFLAGS="-C link-arg=-fuse-ld=mold"
# Try to uncomment the following lines if you encounter EGL_BAD_PARAMETER errors:
# export LIBGL_ALWAYS_SOFTWARE=1
# export WEBKIT_DISABLE_COMPOSITING_MODE=1
echo "Nix development environment loaded!"
echo "Available tools: rustc, cargo"
'';
}