1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

Merge pull request #291909 from cdmistman/lib-meta-available-on-doc-example

lib.meta.availableOn: add example in documentation
This commit is contained in:
Ryan Mulligan 2024-02-27 12:44:37 -08:00 committed by GitHub
commit 78d6e84385
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,6 +116,10 @@ rec {
platform, or `meta.platforms` is not present.
2. None of `meta.badPlatforms` pattern matches the given platform.
Example:
lib.meta.availableOn { system = "aarch64-darwin"; } pkg.zsh
=> true
*/
availableOn = platform: pkg:
((!pkg?meta.platforms) || any (platformMatch platform) pkg.meta.platforms) &&