How to setup "git clang-format"?

I just get git: 'clang-format' is not a git command. See 'git --help'.

I found some related discussions on reddit that showed libclang.python was needed. I tried adding python312Packages.libclang to the devshell in flake.nix but it didn’t work.
What am I doing wrong?

Looking at nix-locate git-clang-format, the package is indeed libclang.python, not python312Packages.libclang.

The latter appear to be Python bindings for libclang, whereas the former is a separate output of the libclang package, that contains the helper Python scripts. The separation into multiple outputs is done to not require Python when using libclang.

Thank you, it seems I made a silly mistake. I couldn’t find libclang.python on NixOS Search, which made me think it was an outdated package :rofl: