It's a matter of writing a rule. Best follow Jay Conrod's "awesome bazel", IMO that gives enough in terms of documentation to make it happen.
Reply on news.ycombinator.com