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

Design an easy way to get the LICENSE of a nix package #507

Open
hofbi opened this issue Apr 23, 2024 · 1 comment
Open

Design an easy way to get the LICENSE of a nix package #507

hofbi opened this issue Apr 23, 2024 · 1 comment
Labels
P2 major: an upcoming release type: feature request

Comments

@hofbi
Copy link
Contributor

hofbi commented Apr 23, 2024

Is your feature request related to a problem? Please describe.
I have to know and access the lincesnes of all my dependencies. If I include them via bazel directly, I can get this easily from the github repo. But for dependencies that come from nix, it don't see the source code repo

Describe the solution you'd like
For nixpkgs_package, it would be great to have an easy way to get the LICENSE of the respective nix package being used

Describe alternatives you've considered
Some initial websearch brought me to https://nixos.wiki/wiki/Nix_Cookbook#License_stance and https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix but so far I am not 100% how to solve this

@malt3
Copy link
Collaborator

malt3 commented Nov 29, 2024

I think this is a great idea!
Bazel is slowly standardizing how licenses are attached to targets.
The current progress is shown in rules_license, which might be split up into smaller modules.

I think we could try to take the LICENSE from nix and stick it into REPO.bazel:

repo(
    default_package_metadata = ["//:my_license"],
)

@malt3 malt3 added the P2 major: an upcoming release label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 major: an upcoming release type: feature request
Projects
None yet
Development

No branches or pull requests

2 participants