How do you package a lib with a NIF?

Yep, you can even see part of that in mix help new:

A --sup option can be given to generate an OTP application skeleton including a
supervision tree. Normally an app is generated without a supervisor and without
the app callback.