I think I tried that, but I got the following error:
$ bazel build pkg:lw-ats
ERROR: /usr/local/home/mzhao/s/m3/main/tools/build_rules/pkg_deb.bzl:89:11:
Illegal argument: expected <String, Builder> type for 'attrs' but got
<string, SelectorList> instead.
ERROR: /usr/local/home/mzhao/s/m3/main/pkg/BUILD:1: Extension file
'tools/build_rules/pkg_deb.bzl' has errors.
ERROR: error loading package 'pkg': Extension file
'tools/build_rules/pkg_deb.bzl' has errors.
I ended up creating another level of indirection by wrapping it with
another macro, as you can see in my skylark rule here:
https://github.com/mzhaom/trunk/blob/master/tools/build_rules/pkg_deb.bzl