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
stdenv: introduce meta.supported #38544
Conversation
This is similar to meta.available but is not influenced by things like allowBroken.
Success on x86_64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: stdenv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Hrm, this shouldn't rebuild anything... |
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.
lib/meta.nix
Outdated
@@ -87,5 +87,5 @@ rec { | |||
else { parsed = elem; }; | |||
in lib.matchAttrs pattern platform; | |||
|
|||
enableIfAvailable = p: if p.meta.available or true then [ p ] else []; | |||
enableIfSupported = p: lib.optional p.meta.supported or true p; |
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.
I'm not sure if parens are literally required here but lib.optional (p.meta.supported or true) p
seems much better IMO.
@@ -241,6 +241,7 @@ rec { | |||
&& (if config.checkMetaRecursively or false | |||
then lib.all (d: d.meta.available or true) references | |||
else true); | |||
supported = validity.supported or false; |
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.
I think this does the wrong thing in case of unfree license.
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.
Good point, should allowUnfree influence the enable condition or not?
My main goal here is to fix the nix build, I'm fine with closing or reverting this if somebody implements the allowBroken changes. |
Success on x86_64-darwin (full log) Attempted: stdenv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Closing in favour of #38639. |
Motivation for this change
Fixes enableIfAvailable when config.allowBroken is set.
/cc @shlevy
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)