-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.nix
More file actions
26 lines (25 loc) · 703 Bytes
/
shell.nix
File metadata and controls
26 lines (25 loc) · 703 Bytes
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
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = with pkgs; [
clang # C++ compiler
cppcheck # C++ linter
cmake # CMake build system
cmake-format # CMake format tool
nixfmt # Nix formatter
just # Just runner
pkg-config # Package configuration
emscripten # Emscripten for web assembly
nodejs # Required for Emscripten
ninja # Ninja build system
git # Git for version control
];
# Shell hook to set up environment
shellHook = ''
# Set Emscripten cache to a writable directory within the project
export EM_CACHE_DIR="$PWD/.emscripten_cache"
export EM_CACHE="$EM_CACHE_DIR"
export EMCC_TEMP_DIR="$EM_CACHE_DIR/tmp"
'';
}