How can you include native libraries in a Haskell package?

I wanna develop a graphical application with Haskell using GLFW-b and it depends on GL and X libraries.

Currently I have this flake:

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: {
      packages.default =
        ./package.nix { };

and this package:

{ mkDerivation, base, GLFW-b, lib }:
mkDerivation {
  pname = package-name;
  version = "";
  src = ./.;
  isLibrary = false;
  isExecutable = true;
  executableHaskellDepends = [ base GLFW-b containers ];
  doHaddock = false;
  license =;

But of course, this isn’t enough, because GLFW-b also depends on some native libraries.

So when I nix develop and then cabal build, I get this error:

* Missing (or bad) C libraries: GL, X11, Xi, Xrandr, Xxf86vm, Xcursor,

How can I include the native libraries in the mkDerivation call? I tried looking up the definition of mkDerivation but it’s unhelpful.