{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = with pkgs; [
    # Build tools
    cmake
    ninja
    ccache

    # Compiler
    clang
    llvmPackages.libcxx

    # Dependencies
    lua5_4
    ncurses
    pkg-config # For locating libraries
    gtkmm4     # GTK4 C++ bindings

    # Development tools
    clang-tools  # clangd, clang-format, clang-tidy
    lldb  # Use lldb instead of gdb on macOS

    # Git for FetchContent
    git
  ];

  shellHook = ''
    echo "Lumacs development environment"
    echo "C++ compiler: $(clang++ --version | head -n1)"
    echo "CMake: $(cmake --version | head -n1)"
    echo "Lua: $(lua -v)"

    # Set compiler to clang
    export CC=clang
    export CXX=clang++

    # Enable ccache
    export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  '';
}
