feat(flake-info): handle compound licenses from nixpkgs#1227
Open
KiaraGrouwstra wants to merge 1 commit intomainfrom
Open
feat(flake-info): handle compound licenses from nixpkgs#1227KiaraGrouwstra wants to merge 1 commit intomainfrom
KiaraGrouwstra wants to merge 1 commit intomainfrom
Conversation
Contributor
Nixpkgs is introducing compound license expressions (AND, OR, WITH, PLUS) via NixOS/nixpkgs#468378. This extends the `License` enum to deserialize the new `licenseType`-tagged structures, recursively flattens them into leaf licenses for the search index, and exposes a `package_license_expression` field carrying the SPDX-style expression string when compound licenses are present. Bump import index version to 47 for the new field.
ece8f5a to
8acef15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends the
Licenseenum to deserialize the newlicenseType-tagged structures, recursively flattens them into leaf licenses for the search index, and exposes apackage_license_expressionfield carrying the SPDX-style expression string (AND, OR, WITH, PLUS) when compound licenses are present (see NixOS/nixpkgs#468378).Bump import index version to 47 for the new field.
Note that a potential follow-up would be to compound-proof our license filter, which under this PR just matches on any package containing a license in its expression.
Disclaimer: i used a coding agent in the creation of this patch.