GitHub has a license API (https://docs.github.com/en/rest/reference/licenses), and the Debian Copyright file is machine readable. I suggest a Homebrew dev command that looks up the Debian package name in Repology, fetches the Debian copyright file, translates it to a Homebrew license_info DSL call, prints to the console, or optionally modifies the formula and opens a pull request.
TBD
Homebrew is in the process of adding license_info blocks to all formulae.
This feature is primarily intended for developers.
Manually interpreting licenses and adding license_info to formulae.
This looks like something I can work on! I have some context about Formula license. Let me get more context about this and I will ask if I have any questions.
Hi @sjackman, I dug around the docs, issues and PRs but can't seem to find any information about what a license_info block looks like. Could you link me to the relevant PR / issue so that I may get some context?
@jonchang The license DSL was mostly written by @lionellloh. I'm pretty sure license_info was a typo here from @sjackman and it should have been license. Does that make more sense if so @lionellloh?
The more detailed license blocks are new though, which is what the documentation goes into.
@jonchang I don't see any reference to license_info in that docs or in Homebrew/homebrew-core?
Yes, I was assuming that Shaun had made a typo.
Yes that answers my question, thanks!
Yes, a typo. Sorry for the confusion.
Most helpful comment
This looks like something I can work on! I have some context about Formula license. Let me get more context about this and I will ask if I have any questions.