-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
various: move license check "behind" meta.unfree eval #426642
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
Merged
wolfgangwalther
merged 3 commits into
NixOS:master
from
wolfgangwalther:ci-eval-asserts-licenses
Jul 20, 2025
Merged
various: move license check "behind" meta.unfree eval #426642
wolfgangwalther
merged 3 commits into
NixOS:master
from
wolfgangwalther:ci-eval-asserts-licenses
Jul 20, 2025
Conversation
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool.
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;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I agree with this approach for android. |
numinit
approved these changes
Jul 19, 2025
hadilq
approved these changes
Jul 19, 2025
1 task
Successfully created backport PR for |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
8.has: port to stable
This PR already has a backport to the stable release.
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin.
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux.
12.approvals: 3+
This PR was reviewed and approved by three or more persons.
backport release-25.05
Backport PR automatically
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
meta
section 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.