Use clang-tidy with libc++ instead of libstdc++ on linux

Hi, I’m having some trouble with clang-tidy coming from the llvmPackages_{18,19}.clang-tools package. On macos, clang-tidy will use libc++, but on linux it won’t. This is despite using pkgs.llvmPackages_18.libcxxStdenv as my stdenv. Is there a way to override which standard library clang-tool will use? Thanks for the help.

I see that there’s an attribute here: nixpkgs/pkgs/development/compilers/llvm/common/clang-tools/default.nix at 6ae34b4c742ce9ab7704a9603bbb59c841b068c4 · NixOS/nixpkgs · GitHub

But I’m not sure how to use it or override it so clang tidy on linux would use libc++

Solution found: simply call the package with override:

llvmPackages_19.clang-tools.override {
  enableLibcxx = true;
}