This post is a bit old now, and might not be entirely what you were looking for, but I wrote about getting my personal blog building with nix, including an example of using an overlay and patching and upstream dependency:
https://rebeccaskinner.net/posts/2021-06-06-nixifying-a-haky...