rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Example showing how to cause pkgbuild to generate an installable .pkg ?

Open chickenandpork opened this issue 3 years ago • 5 comments

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?

chickenandpork avatar Jan 16 '22 20:01 chickenandpork

( related: https://github.com/bazelbuild/rules_pkg/issues/264 )

chickenandpork avatar Jan 16 '22 20:01 chickenandpork

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.

keith avatar Jan 16 '22 20:01 keith

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.

chickenandpork avatar Jan 16 '22 20:01 chickenandpork

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

keith avatar Jan 16 '22 22:01 keith

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.

mzeren-vmw avatar Jan 17 '22 02:01 mzeren-vmw