rules_nixpkgs icon indicating copy to clipboard operation
rules_nixpkgs copied to clipboard

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

Open hofbi opened this issue 1 year ago • 1 comments

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

hofbi avatar Apr 23 '24 12:04 hofbi

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 avatar Nov 29 '24 16:11 malt3