I don't think we need to distinguish between modules provided by nginx cookbook and any other (custom) cookbook. They are all custom in a sense. I just prefixed default modules specified in attributes with cookbook they belong to and removed nginx:: prefix form the recipe. Should be pretty generic.
The other important change is separation of archive unpacking and compilation. The intention here is to provide the option for custom modules to apply patches to source tree before compilation. See http://yaoweibin.github.io/nginx_tcp_proxy_module/ as one such module example where it needs to apply tcp patch ( patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch )