Hello Josh Triplett, Manually handling the dependencies of -dev packages often leads to mistakes. Automating this similar to how you describe has multiple times surfaced where I'm involved (and I guess also in other places). Unfortunately noone has volunteered to actually implement it. Thanks for your interest in doing so! Please announce your progress so we can test if your work is generic enough for more people to use and possibly give you some other feedback. Please try to make everything as automated as possible (and able to override when needed for bonus points, but I guess that could possibly also be handled separately outside the substvar).
Regards, Andreas Henriksson