Skip to content
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

Include meta in package derivations #292

Closed
khaled opened this issue Sep 10, 2022 · 3 comments · Fixed by #294
Closed

Include meta in package derivations #292

khaled opened this issue Sep 10, 2022 · 3 comments · Fixed by #294
Labels
enhancement New feature or request

Comments

@khaled
Copy link

khaled commented Sep 10, 2022

I'm using the following to generate a basic BOM:

nix bundle .#my-package --bundler bundlers#toReport

The report will include node packages, but the they are missing license and maintainer information. For example:

express-4.18.1 (no license) maintained by nobody

It would be nice if derivations generated for each package included meta extracted from their package.jsons. Typically they will include license, author, and contributor information. According to the package.json docs, licenses should generally use SPDX identifiers, which should hopefully make them easily to translate to meta.license.

@yusdacra
Copy link
Member

I do this in nix-cargo-integration for Cargo projects. I can upstream that logic here and polish it up and add it to nodejs, rust and etc. subsystems.

@khaled
Copy link
Author

khaled commented Sep 10, 2022

@yusdacra that sounds like a lovely idea :)

@yusdacra
Copy link
Member

yusdacra commented Sep 13, 2022

I made #294 which adds licenses info for nodejs and rust. However, the report still doesn't work, because it doesn't handle multiple licenses (see https://github.com/NixOS/bundlers/blob/master/report/default.nix#L162-L168). But this isn't a dream2nix issue so it should be reported to bundlers repo. this was my fault, I fixed it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants