shell.nix 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. { pkgs ? import <nixpkgs> {} }:
  2. pkgs.mkShell {
  3. buildInputs = with pkgs; [
  4. # Build tools
  5. cmake
  6. ninja
  7. ccache
  8. # Compiler
  9. clang
  10. llvmPackages.libcxx
  11. # Dependencies
  12. lua5_4
  13. ncurses
  14. pkg-config # For locating libraries
  15. gtkmm4 # GTK4 C++ bindings
  16. fribidi # Required by pango/GTK
  17. libthai # Required by pango/GTK
  18. libdatrie # Required by libthai
  19. expat # Required by fontconfig
  20. xorg.libXdmcp # Required by xcb
  21. # Development tools
  22. clang-tools # clangd, clang-format, clang-tidy
  23. lldb # Use lldb instead of gdb on macOS
  24. # Git for FetchContent
  25. git
  26. gtest
  27. sol2
  28. pcre2
  29. spdlog
  30. raylib
  31. ];
  32. shellHook = ''
  33. echo "Lumacs development environment"
  34. echo "C++ compiler: $(clang++ --version | head -n1)"
  35. echo "CMake: $(cmake --version | head -n1)"
  36. echo "Lua: $(lua -v)"
  37. # Set compiler to clang
  38. export CC=clang
  39. export CXX=clang++
  40. # Enable ccache
  41. export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  42. '';
  43. }