various: move license check "behind" meta.unfree eval#426642
Merged
wolfgangwalther merged 3 commits intoNixOS:masterfrom Jul 20, 2025
Merged
various: move license check "behind" meta.unfree eval#426642wolfgangwalther merged 3 commits intoNixOS:masterfrom
wolfgangwalther merged 3 commits intoNixOS:masterfrom
Conversation
This now errors with the "allow unfree" error first - and only when that's passed it asserts the specific `licenseFile` option. This ensures that CI will not produce an eval warning for the assert once we turn that on.
Same reasoning as commit before.
This allows evaluating the package's meta attribute without triggering the throw, thus making it possible to list the package in the search results. It also avoids CI falling over with this attribute.
11 tasks
philiptaron
approved these changes
Jul 19, 2025
| throw '' | ||
| You must accept the Blizzard® Starcraft® II AI and Machine Learning License at | ||
| https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html | ||
| by setting nixpkgs config option 'sc2-headless.accept_license = true;' |
Contributor
Contributor
|
Nice, I agree with this approach for android. |
numinit
approved these changes
Jul 19, 2025
hadilq
approved these changes
Jul 19, 2025
1 task
Contributor
|
Successfully created backport PR for |
1 task
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.
Some packages require custom licenses to be accepted, but throw / assert before evaluating anything of the package. This means that not even their
metasection can be evaluated. This has several drawbacks:By moving the license check into an attribute of the derivation that is lazily evaluated, only when the full derivation is, we can eval meta separately - and fix these problems.
Part of #426629, ultimately targeting #397184.
Things done
Add a 👍 reaction to pull requests you find important.