Glibconfig.h: No such file error when building flake package

I forked the ssbm-nix flake to update its version of Slippi and eventually make a PR. For some reason I keep getting the following error trying to build slippi-netplay or slippi-playback with nix build:

/nix/store/hbh6ry74ghyhw9l7m54apqd5451npfi8-glib-2.76.4-dev/include/glib-2.0/glib/gtypes.h:34:10: fatal error: glibconfig.h: No such file or dir
   34 | #include <glibconfig.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

The error shows up once the build progress percentage reaches 71%.

I do not know a whole lot about CMake, but it seems like glibconfig.h’s location is already specified in cmakeFlags. I am not sure what to do or what the cause is.

In case it’s important, the changes I made so far are:

  • Updating nixpkgs
  • Updating slippi-ishiiruka from 3.0.3 to 3.2.2
  • Using the following to compile a Rust submodule in slippi-ishiiruka:
    • rustPlatform.cargoSetupHook
    • cargoRoot
    • cargoDeps
  • Changing the following dependencies in slippi-ishiiruka:
    • Replacing wxGTK30 with wxGTK32
    • Replacing mbedtls with mbedtls_2
    • Adding alsa-lib, rustc, cargo, and rustPlatform.cargoSetupHook for the submodule

Although it was formatted a little by nixpkgs-fmt, I did not change the value of cmakeFlags. In addition, the Rust submodule seems to compile successfully as far as I can tell.

Solved it. It turns out the CMake flags were looking in ${glib.out}/lib/glib-3.0/include, which apparently does not exist. I fixed it by changing it to ${glib.out}/lib/glib-2.0/include.