shell.nix 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. ];
  31. shellHook = ''
  32. echo "Lumacs development environment"
  33. echo "C++ compiler: $(clang++ --version | head -n1)"
  34. echo "CMake: $(cmake --version | head -n1)"
  35. echo "Lua: $(lua -v)"
  36. # Set compiler to clang
  37. export CC=clang
  38. export CXX=clang++
  39. # Enable ccache
  40. export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  41. '';
  42. }