As per what was discussed in https://github.com/ninenines/cowboy/issues/1651, this issue's goal is to be a reference for future discussion around implementing an erlang.mk "system" that allows populating .app with license information that can be used both by Hex.pm and rebar3_sbom, for example.
Example expectation
It could look something like
# erlang.mk
LICENSE = ISC
after which e.g. target ebin/$(PROJECT).app could generate output such as
{licenses, ["ISC"]}
Further considerations
The license information could be detected from an existing LICENSE file (as proposed by @essen in the linked issue) and extracted using licensee and jq. It should also be possible to cache this information (and read from the cache, when available) so as to not call the same "system" over and over at compile time.
As per what was discussed in https://github.com/ninenines/cowboy/issues/1651, this issue's goal is to be a reference for future discussion around implementing an
erlang.mk
"system" that allows populating.app
with license information that can be used both by Hex.pm andrebar3_sbom
, for example.Example expectation
It could look something like
after which e.g. target
ebin/$(PROJECT).app
could generate output such asFurther considerations
The license information could be detected from an existing
LICENSE
file (as proposed by @essen in the linked issue) and extracted usinglicensee
andjq
. It should also be possible to cache this information (and read from the cache, when available) so as to not call the same "system" over and over at compile time.