-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathshell.nix
42 lines (39 loc) · 1.01 KB
/
shell.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
# NOTE It is for linux deployment build only. Use it with `nix-shell --pure`
# NOTE if you failed to run vulkan, please check you are in the "video" user group
{ pkgs ? import (fetchTarball "https://github.com/verygoodgraphics/nixpkgs/archive/refs/tags/unstable-20230917.tar.gz") {}
, nixgl ? import (fetchTarball "https://github.com/verygoodgraphics/nixGL/archive/master.tar.gz") {}
, nvidiaGpu ? false
}:
with pkgs;
mkShell {
buildInputs = [
# build tools
clang_15
cmake
cmakeCurses
ninja
python3
glslang # or shaderc
# libs
SDL2
vulkan-headers
vulkan-loader
nixgl.nixGLIntel
nixgl.nixVulkanIntel
# other tools
vim
less
which
vulkan-tools # for vulkaninfo
mesa-demos # for eglinfo
]
++ lib.optionals nvidiaGpu [
nixgl.auto.nixGLDefault
nixgl.auto.nixVulkanNvidia
]
;
shellHook = ''
export CC=${clang_15}/bin/clang
export CXX=${clang_15}/bin/clang++
'';
}