2020-04-24 23:36:52 +00:00
|
|
|
{ lib }:
|
|
|
|
let
|
|
|
|
inherit (lib) lists;
|
|
|
|
inherit (lib.systems) parse;
|
|
|
|
inherit (lib.systems.inspect) predicates;
|
|
|
|
inherit (lib.attrsets) matchAttrs;
|
|
|
|
|
|
|
|
all = [
|
2021-04-25 03:57:28 +00:00
|
|
|
# Cygwin
|
|
|
|
"i686-cygwin" "x86_64-cygwin"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# Darwin
|
|
|
|
"x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# FreeBSD
|
2022-11-21 17:40:18 +00:00
|
|
|
"i686-freebsd13" "x86_64-freebsd13"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# Genode
|
|
|
|
"aarch64-genode" "i686-genode" "x86_64-genode"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# illumos
|
|
|
|
"x86_64-solaris"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# JS
|
2023-03-15 16:39:30 +00:00
|
|
|
"javascript-ghcjs"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# Linux
|
|
|
|
"aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux"
|
2022-09-09 14:08:57 +00:00
|
|
|
"armv7l-linux" "i686-linux" "m68k-linux" "microblaze-linux"
|
|
|
|
"microblazeel-linux" "mipsel-linux" "mips64el-linux" "powerpc64-linux"
|
|
|
|
"powerpc64le-linux" "riscv32-linux" "riscv64-linux" "s390-linux"
|
|
|
|
"s390x-linux" "x86_64-linux"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# MMIXware
|
|
|
|
"mmix-mmixware"
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# NetBSD
|
|
|
|
"aarch64-netbsd" "armv6l-netbsd" "armv7a-netbsd" "armv7l-netbsd"
|
2021-08-05 21:33:18 +00:00
|
|
|
"i686-netbsd" "m68k-netbsd" "mipsel-netbsd" "powerpc-netbsd"
|
|
|
|
"riscv32-netbsd" "riscv64-netbsd" "x86_64-netbsd"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# none
|
2021-12-19 01:06:50 +00:00
|
|
|
"aarch64_be-none" "aarch64-none" "arm-none" "armv6l-none" "avr-none" "i686-none"
|
2022-09-09 14:08:57 +00:00
|
|
|
"microblaze-none" "microblazeel-none" "msp430-none" "or1k-none" "m68k-none"
|
|
|
|
"powerpc-none" "powerpcle-none" "riscv32-none" "riscv64-none" "rx-none"
|
|
|
|
"s390-none" "s390x-none" "vc4-none" "x86_64-none"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# OpenBSD
|
|
|
|
"i686-openbsd" "x86_64-openbsd"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# Redox
|
|
|
|
"x86_64-redox"
|
2020-11-15 13:44:38 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# WASI
|
|
|
|
"wasm64-wasi" "wasm32-wasi"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# Windows
|
|
|
|
"x86_64-windows" "i686-windows"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
allParsed = map parse.mkSystemFromString all;
|
|
|
|
|
|
|
|
filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed);
|
|
|
|
|
|
|
|
in {
|
|
|
|
inherit all;
|
|
|
|
|
|
|
|
none = [];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
arm = filterDoubles predicates.isAarch32;
|
2023-01-20 10:41:00 +00:00
|
|
|
armv7 = filterDoubles predicates.isArmv7;
|
2020-09-25 04:45:31 +00:00
|
|
|
aarch64 = filterDoubles predicates.isAarch64;
|
|
|
|
x86 = filterDoubles predicates.isx86;
|
|
|
|
i686 = filterDoubles predicates.isi686;
|
|
|
|
x86_64 = filterDoubles predicates.isx86_64;
|
2022-09-09 14:08:57 +00:00
|
|
|
microblaze = filterDoubles predicates.isMicroBlaze;
|
2020-09-25 04:45:31 +00:00
|
|
|
mips = filterDoubles predicates.isMips;
|
2020-11-15 13:44:38 +00:00
|
|
|
mmix = filterDoubles predicates.isMmix;
|
2023-01-20 10:41:00 +00:00
|
|
|
power = filterDoubles predicates.isPower;
|
2020-09-25 04:45:31 +00:00
|
|
|
riscv = filterDoubles predicates.isRiscV;
|
2022-04-27 09:35:20 +00:00
|
|
|
riscv32 = filterDoubles predicates.isRiscV32;
|
|
|
|
riscv64 = filterDoubles predicates.isRiscV64;
|
2022-06-16 17:23:12 +00:00
|
|
|
rx = filterDoubles predicates.isRx;
|
2020-09-25 04:45:31 +00:00
|
|
|
vc4 = filterDoubles predicates.isVc4;
|
2020-11-19 00:13:47 +00:00
|
|
|
or1k = filterDoubles predicates.isOr1k;
|
2021-08-05 21:33:18 +00:00
|
|
|
m68k = filterDoubles predicates.isM68k;
|
|
|
|
s390 = filterDoubles predicates.isS390;
|
2023-01-20 10:41:00 +00:00
|
|
|
s390x = filterDoubles predicates.isS390x;
|
2020-09-25 04:45:31 +00:00
|
|
|
js = filterDoubles predicates.isJavaScript;
|
|
|
|
|
|
|
|
bigEndian = filterDoubles predicates.isBigEndian;
|
|
|
|
littleEndian = filterDoubles predicates.isLittleEndian;
|
|
|
|
|
|
|
|
cygwin = filterDoubles predicates.isCygwin;
|
|
|
|
darwin = filterDoubles predicates.isDarwin;
|
|
|
|
freebsd = filterDoubles predicates.isFreeBSD;
|
2020-04-24 23:36:52 +00:00
|
|
|
# Should be better, but MinGW is unclear.
|
2022-03-30 09:31:56 +00:00
|
|
|
gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; })
|
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnueabi; })
|
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnueabihf; })
|
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabin32; })
|
2022-09-09 14:08:57 +00:00
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabi64; })
|
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabielfv1; })
|
|
|
|
++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabielfv2; });
|
2020-09-25 04:45:31 +00:00
|
|
|
illumos = filterDoubles predicates.isSunOS;
|
|
|
|
linux = filterDoubles predicates.isLinux;
|
|
|
|
netbsd = filterDoubles predicates.isNetBSD;
|
|
|
|
openbsd = filterDoubles predicates.isOpenBSD;
|
|
|
|
unix = filterDoubles predicates.isUnix;
|
|
|
|
wasi = filterDoubles predicates.isWasi;
|
|
|
|
redox = filterDoubles predicates.isRedox;
|
|
|
|
windows = filterDoubles predicates.isWindows;
|
|
|
|
genode = filterDoubles predicates.isGenode;
|
|
|
|
|
|
|
|
embedded = filterDoubles predicates.isNone;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64-linux" "powerpc64le-linux" "aarch64-darwin" "riscv64-linux"];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|