select
lib.systems.platforms.select
Docs pulled from | This Revision | 10 minutes ago
included in the platform in order to further elaborate it.
Noogle detected
Implementation
The following is the current implementation of this function.
select =
platform:
# x86
if platform.isx86 then
pc
# ARM
else if platform.isAarch32 then
let
version = platform.parsed.cpu.version or null;
in
if version == null then
pc
else if lib.versionOlder version "6" then
sheevaplug
else if lib.versionOlder version "7" then
raspberrypi
else
armv7l-hf-multiplatform
else if platform.isAarch64 then
if platform.isDarwin then apple-m1 else aarch64-multiplatform
else if platform.isRiscV then
riscv-multiplatform
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then
(import ./examples.nix { inherit lib; }).mipsel-linux-gnu
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then
powernv
else
{ };