mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
lib: Allow parsing platform configs with arch of {riscv,wasm}{32,64}
Also add `isRiscv` and `isWasm` predicates.
This commit is contained in:
parent
931a0b8be8
commit
d1478c91c3
@ -5,8 +5,6 @@ with lib.lists;
|
||||
|
||||
rec {
|
||||
patterns = rec {
|
||||
"32bit" = { cpu = { bits = 32; }; };
|
||||
"64bit" = { cpu = { bits = 64; }; };
|
||||
i686 = { cpu = cpuTypes.i686; };
|
||||
x86_64 = { cpu = cpuTypes.x86_64; };
|
||||
PowerPC = { cpu = cpuTypes.powerpc; };
|
||||
@ -14,6 +12,11 @@ rec {
|
||||
Arm = { cpu = { family = "arm"; }; };
|
||||
Aarch64 = { cpu = { family = "aarch64"; }; };
|
||||
Mips = { cpu = { family = "mips"; }; };
|
||||
RiscV = { cpu = { family = "riscv"; }; };
|
||||
Wasm = { cpu = { family = "wasm"; }; };
|
||||
|
||||
"32bit" = { cpu = { bits = 32; }; };
|
||||
"64bit" = { cpu = { bits = 64; }; };
|
||||
BigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
|
||||
LittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };
|
||||
|
||||
|
@ -44,6 +44,10 @@ rec {
|
||||
x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; };
|
||||
mips64el = { bits = 32; significantByte = littleEndian; family = "mips"; };
|
||||
powerpc = { bits = 32; significantByte = bigEndian; family = "power"; };
|
||||
riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; };
|
||||
riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; };
|
||||
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
|
||||
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
|
||||
};
|
||||
|
||||
isVendor = isType "vendor";
|
||||
|
Loading…
Reference in New Issue
Block a user