-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding extra licenses #200
Comments
cargo-about does have a concept of workarounds which is meant to tackle crates that do not correctly define their licenses that I think can be used here. Though best is to fix it upstream in the crate so it properly declares all of its licenses and has its license texts available for inclusion in the summary. In general I think There was a recent similar example to this with the Believe there are many more That said, it may get a bit extra tricky also with how to include the license texts for such a crate, would have to include all the ones selected and have the text for the ones in the wrapped C library be available |
Unfortunately, there is two reasons that I cannot change the
I don't see how I could make sure the proper license file gets included without having a generic way to add extra licenses that is outside of cargo's world. For now the only solution I can think of is to append the content manually to the file after its generation... :( My ideal solution would be a section in extra = [
{ package = "oss-library-name1", license-file = "./path/to/license1.txt" },
{ package = "oss-library-name2", license-file = "./path/to/license2.txt" },
] |
If I understand correctly, the I cannot use this though because the code I am trying to include the license of is not a crate, so |
but the code that is not a crate, must surely be used by a crate? like a that said, it would show up as the sys crate then but likely the license file has the full project name in it (if it is not a genric one where they don't care about it). that said, I could see some other similar needs of adding full free form licenses to cargo-about, for example our binary includes a free but licensed and for that one could have a mechanism similar to what you described |
Yes exactly, as you mention, some use case cannot be supported since the license apply to something that does not appear in cargo's dependency tree and hence I don't mind contributing that functionality. Would the list of objects as shown here #200 (comment) be a good format? |
I will let @Jake-Shadle make the call still as he is the maintainer and code owner, but is currently out on vacation and should not be replying here :) but he is back next week so can follow up then! |
I am also interested in this. My use case would be to include some non-rust-related licenses, like font licenses (which @repi already give as example) and android library licenses. My current approach is to hard-code the license inside the handlebars source file, but this is not very maintainable. |
For now I'm using a bit of a hack where I'm creating an empty crate just to reference the license for a font I'm using. This works, and I was able to specify the repository in the empty crate to point where the link should go etc. |
Is your feature request related to a problem? Please describe.
I need to provide licenses for non-crate code that is being included in a project. The code is in C and is wrapped in a
-sys
FFI crate. Right now,cargo-about
will see the-sys
crate and include its license, but cannot go further and find the wrapper C code's license.Describe the solution you'd like
I don't expect
cargo-about
to be able to track the C code license as it does for Rust crates, but it would be nice if I could manually add "extra" licenses to include in the final report. I think theabout.toml
config file might be the best place that information.Describe alternatives you've considered
The final report could be manually edited but that brings us back to scripts to build the license file
The text was updated successfully, but these errors were encountered: