lib.systems.platforms: Make selection more flexible

We dont have to match on exact strings if we get accessed to `parsed`.

Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
This commit is contained in:
John Ericson
2020-11-29 00:03:45 +00:00
co-authored by Matthew Bauer
parent 947f27fd0f
commit 40e7be11c8
2 changed files with 19 additions and 14 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ rec {
system = parse.doubleFromSystem final.parsed;
config = parse.tripleFromSystem final.parsed;
# Just a guess, based on `system`
platform = platforms.selectBySystem final.system;
platform = platforms.select final;
# Determine whether we are compatible with the provided CPU
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu;
# Derived meta-data