Currently Whonix is mostly build in Qubes Builder terms in 04_install_qubes_post.sh. And Whonix is installed using --target qubes, which is very similar to --target root. (Very similar to physical isolation builds.) This is suboptimal, because therefore currently all the build dependencies get installed inside the chroot/template.
It would be cleaner and reduce the template size by having Qubes Builder build all Whonix packages.
There was some related discussion on that in T402.
This is difficult. [Unsure if @Patrick can implement this.] [For Whonix 13 .]
??_??_??_??.sh running inside the Debian package building chroot:
04_install_qubes_post.sh running inside the Qubes-Whonix chroot: