Where in nixpkgs to contribute Haskell library patches?

I wanted to use the Haskell serversession-backend-persistent package, but noticed it is marked as broken for most package sets. After building it myself, I found the tests were the only issue, in particular, it needs a running PostgreSQL instance to run the tests with.

Now, I could just ignore the failing tests and call it a day, but I wanted to see if it was that hard to fix.

Here are the overrides to make the tests pass:

serversession-backend-persistent = 
  hsuper.serversession-backend-persistent.overrideAttrs (oldAttrs: {
    preCheck = oldAttrs.preCheck or "" + ''
      initdb -D /tmp/myPg
      pg_ctl -D /tmp/myPg -o "-k /tmp/myPg" -l logfile start || (cat logfile && exit 1)
      psql -d postgres -h /tmp/myPg -c "CREATE USER test WITH PASSWORD 'test';"
      psql -d postgres -h /tmp/myPg -c "CREATE DATABASE test OWNER test;"
    '';

    postCheck = oldAttrs.postCheck or "" + ''
      pg_ctl -D /tmp/myPg stop
    '';

    buildInputs = oldAttrs.buildInputs or [] ++ [ pkgs.postgresql ];
    meta.broken = false;
  });

In a perfect world I would add these to the library’s nix file, but I know this author does not want anything nix related that they would have to maintain. So, I’d like to put this in nixpkgs directly, but I’m a little lost on where it should go.

Any pointers on where I should add these overrides in nixpkgs would be appreciated.