lib: Factor in tiny bit of meta.platform checking#37395
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom Mar 20, 2018
Merged
lib: Factor in tiny bit of meta.platform checking#37395Ericson2314 merged 1 commit intoNixOS:masterfrom
meta.platform checking#37395Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
I need it in stdenv and release-lib, so that seems motivation enough.
e472e96 to
e547bd0
Compare
Member
Author
|
I need this to fix some things I broke in #3444 (missing tests so I guess ofborg didn't notice). |
Ericson2314
commented
Mar 20, 2018
| We can inject these into a patten for the whole of a structured platform, | ||
| and then match that. | ||
| */ | ||
| platformMatch = platform: elem: let |
Member
Author
There was a problem hiding this comment.
CC @vcunat I did this and not matchPlatform because the platform comes before the pattern, but maybe it's best to keep normal English word order here.
This was referenced Oct 9, 2022
2 tasks
alyssais
pushed a commit
that referenced
this pull request
Jan 11, 2023
`hasUnsupportedPlatform` was not updated with #37395, so it does not understand attrsets in `meta.[bad]platforms`. In particular, attrsets in `meta.badPlatforms` will "fail open" and be ignored. Let's use `lib.meta.availableOn` instead of duplicating its logic. Thanks to @alyssais for [noticing][1]. [1][#194148 (comment)] Co-authored-by: sternenseemann <sternenseemann@systemli.org>
adamcstephens
pushed a commit
to adamcstephens/nixpkgs
that referenced
this pull request
Jan 25, 2023
`hasUnsupportedPlatform` was not updated with NixOS#37395, so it does not understand attrsets in `meta.[bad]platforms`. In particular, attrsets in `meta.badPlatforms` will "fail open" and be ignored. Let's use `lib.meta.availableOn` instead of duplicating its logic. Thanks to @alyssais for [noticing][1]. [1][NixOS#194148 (comment)] Co-authored-by: sternenseemann <sternenseemann@systemli.org>
13 tasks
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.
Motivation for this change
I need it in stdenv and release-lib, so that seems motivation enough.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)