Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into HEAD
- Loading branch information
Showing
159 changed files
with
4,758 additions
and
2,967 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
rec { | ||
doubles = import ./doubles.nix; | ||
parse = import ./parse.nix; | ||
platforms = import ./platforms.nix; | ||
|
||
# Elaborate a `localSystem` or `crossSystem` so that it contains everything | ||
# necessary. | ||
# | ||
# `parsed` is inferred from args, both because there are two options with one | ||
# clearly prefered, and to prevent cycles. A simpler fixed point where the RHS | ||
# always just used `final.*` would fail on both counts. | ||
elaborate = args: let | ||
final = { | ||
# Prefer to parse `config` as it is strictly more informative. | ||
parsed = parse.mkSystemFromString (if args ? config then args.config else args.system); | ||
# Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. | ||
system = parse.doubleFromSystem final.parsed; | ||
config = parse.tripleFromSystem final.parsed; | ||
# Just a guess, based on `system` | ||
platform = platforms.selectBySystem final.system; | ||
} // args; | ||
in final; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
let lists = import ../lists.nix; in | ||
let parse = import ./parse.nix; in | ||
let inherit (import ../attrsets.nix) matchAttrs; in | ||
|
||
let | ||
all = [ | ||
"aarch64-linux" | ||
"armv5tel-linux" "armv6l-linux" "armv7l-linux" | ||
|
||
"mips64el-linux" | ||
|
||
"i686-cygwin" "i686-freebsd" "i686-linux" "i686-netbsd" "i686-openbsd" | ||
|
||
"x86_64-cygwin" "x86_64-darwin" "x86_64-freebsd" "x86_64-linux" | ||
"x86_64-netbsd" "x86_64-openbsd" "x86_64-solaris" | ||
]; | ||
|
||
allParsed = map parse.mkSystemFromString all; | ||
|
||
filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed); | ||
|
||
in rec { | ||
inherit all; | ||
|
||
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all; | ||
none = []; | ||
|
||
arm = filterDoubles (matchAttrs { cpu = { family = "arm"; bits = 32; }; }); | ||
i686 = filterDoubles parse.isi686; | ||
mips = filterDoubles (matchAttrs { cpu = { family = "mips"; }; }); | ||
x86_64 = filterDoubles parse.isx86_64; | ||
|
||
cygwin = filterDoubles (matchAttrs { kernel = parse.kernels.cygwin; }); | ||
darwin = filterDoubles parse.isDarwin; | ||
freebsd = filterDoubles (matchAttrs { kernel = parse.kernels.freebsd; }); | ||
gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); # Should be better | ||
illumos = filterDoubles (matchAttrs { kernel = parse.kernels.solaris; }); | ||
linux = filterDoubles parse.isLinux; | ||
netbsd = filterDoubles (matchAttrs { kernel = parse.kernels.netbsd; }); | ||
openbsd = filterDoubles (matchAttrs { kernel = parse.kernels.openbsd; }); | ||
unix = filterDoubles parse.isUnix; | ||
|
||
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux"]; | ||
} |
Oops, something went wrong.