Haskell project freeglut/opengl issues

I’m working on a haskell project which depends on the Gloss library which interfaces with OpenGL. The project.cabal and shell.nix file can be found here. Entering the nix-shell environment and executing cabal v2-run works fine on my desktop with nvidia drivers, but on my laptop with intel integrated graphics and mesa (using the new gallium/iris version) drivers I get this error when trying to cabal v2-run

freeglut (GameOfLife):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

and I’m not sure what the issue is.