Merge pull request #291910 from cdmistman/lib-meta-platform-match-expand-docs

lib.meta.platformMatch: add example in documentation
This commit is contained in:
Ryan Mulligan 2024-02-27 12:44:22 -08:00 committed by GitHub
commit 87a9359410
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ rec {
We can inject these into a pattern for the whole of a structured platform,
and then match that.
Example:
lib.meta.platformMatch { system = "aarch64-darwin"; } "aarch64-darwin"
=> true
*/
platformMatch = platform: elem: (
# Check with simple string comparison if elem was a string.