How to compile a program that includes <vterm.h>?

Hi, I’m trying to compile Emacs vterm module (emacs-libvterm). I created the following shell.nix:

with import <nixpkgs> {};
stdenv.mkDerivation {
  name = "myenv";
  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ glib libvterm ];
}

When I try to compile emacs-libvterm (after running cmake), I get the following error:

In file included from /home/pdm/install/emacs-libvterm/vterm-module.h:7,
                 from /home/pdm/install/emacs-libvterm/vterm-module.c:1:
/nix/store/wkbqhxih8d7m6mm591cs8ijs4xrfng23-libvterm-0.99.7/include/vterm.h:29:10: fatal error: glib.h: No such file or directory
   29 | #include <glib.h>
      |          ^~~~~~~~

Looking into $NIX_CFLAGS_COMPILE, it looks like glib-2.0 prefix is missing in the include but when I attempt to add -isystem /nix/store/hb6idpb0z1h019bb0hslj9wj3h3qdfhq-glib-2.68.2-dev/include/glib-2.0 there, I get another error:

In file included from /nix/store/hb6idpb0z1h019bb0hslj9wj3h3qdfhq-glib-2.68.2-dev/include/glib-2.0/glib/galloca.h:32,
                 from /nix/store/hb6idpb0z1h019bb0hslj9wj3h3qdfhq-glib-2.68.2-dev/include/glib-2.0/glib.h:30,
                 from /nix/store/wkbqhxih8d7m6mm591cs8ijs4xrfng23-libvterm-0.99.7/include/vterm.h:29,
                 from /home/pdm/install/emacs-libvterm/vterm-module.h:7,
                 from /home/pdm/install/emacs-libvterm/vterm-module.c:1:
/nix/store/hb6idpb0z1h019bb0hslj9wj3h3qdfhq-glib-2.68.2-dev/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory
   32 | #include <glibconfig.h>
      |          ^~~~~~~~~~~~~~

What am I missing and how can I compile the Emacs vterm module on NixOS?

you’re looking for glib package

$ nix-locate glibconfig.h | grep -v ^\(
glib.out                                          5,637 r /nix/store/jlx0886w36728v3d0maswjq7y1qnp9nx-glib-2.68.3/lib/glib-2.0/include/glibconfig.h
ats.out                                             657 r /nix/store/wwalm6w55yd0rqh5yfjys9fqlp6gnjkr-ats-0.2.12/lib/ats-anairiats-0.2.12/contrib/glib/HATS/glibconfig.hats

Thank you. While I still wonder what must be added to my shell.nix to make the include path for glibconfig.h available in NIX_CFLAGS_COMPILE, I’ve found out that I was using a wrong vterm library: I should use libvterm-neovim instead of libvterm. Then the Emacs module compiles fine.