Building cpp projects with Nixos

Collection of more obscure information.

When developing on Nixos, use:

llvmPackages_13.libcxxClang

Because

clang_13

Does not have libc++.

When creating a shell.nix, also use stdenvNoCC otherwise the environment has a gcc default which you don’t want:

stdenvNoCC.mkDerivation {
  name = "asd";
  buildInputs = [
    # clang_13
    llvmPackages_13.libcxxClang # the other one doesn't have libcxxClang
    gdb
  ];
}