rules_apple
rules_apple copied to clipboard
Example showing how to cause pkgbuild to generate an installable .pkg ?
Is there an example of how to generate a .pkg
that would install by opening on a Mac? (Or have I missed a way to do this with a bundle
?)
If not, is there someone to whom I can send beer, cake, pizza, starbucks to coerce?
( related: https://github.com/bazelbuild/rules_pkg/issues/264 )
Interesting! I don't know of any bazel rule that supports this, and I haven't heard of anyone doing it. I imagine you could spin up a quick genrule that calls pkgbuild and uses the input of another rule and outputs your pkg though.
I appreciate confirming that rules_apple
currently doesn't do this -- I can understand if your interest is around mobile apps, that's the extent of the "itch you'd scratch". rules_apple
seems to have more already set up for it than rules_pkg
.
Yea I think a rule to package those would be fine in rules_apple. Realistically if you want to product that package format it's likely you're using rules_apple already
rules_pkg has general purpose rules (that yield providers) for mapping bazel targets to paths in tar/zip/rpm/etc. They can also declare directories and symlinks entries in packages. Using these rules for .pkg (and .dmg) would make sense.