forked from mirrors/nixpkgs
lib/systems/inspect.nix: add platformPatterns.isStatic
This commit is contained in:
parent
1690aa6858
commit
ea0bcf2505
|
@ -7,6 +7,7 @@ let abis_ = abis; in
|
||||||
let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis_; in
|
let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis_; in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
# these patterns are to be matched against {host,build,target}Platform.parsed
|
||||||
patterns = rec {
|
patterns = rec {
|
||||||
isi686 = { cpu = cpuTypes.i686; };
|
isi686 = { cpu = cpuTypes.i686; };
|
||||||
isx86_32 = { cpu = { family = "x86"; bits = 32; }; };
|
isx86_32 = { cpu = { family = "x86"; bits = 32; }; };
|
||||||
|
@ -90,4 +91,13 @@ rec {
|
||||||
else matchAttrs patterns;
|
else matchAttrs patterns;
|
||||||
|
|
||||||
predicates = mapAttrs (_: matchAnyAttrs) patterns;
|
predicates = mapAttrs (_: matchAnyAttrs) patterns;
|
||||||
|
|
||||||
|
# these patterns are to be matched against the entire
|
||||||
|
# {host,build,target}Platform structure; they include a `parsed={}` marker so
|
||||||
|
# that `lib.meta.availableOn` can distinguish them from the patterns which
|
||||||
|
# apply only to the `parsed` field.
|
||||||
|
|
||||||
|
platformPatterns = {
|
||||||
|
isStatic = { parsed = {}; isStatic = true; };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue