tripleFromSystem
lib.systems.parse.tripleFromSystem
Docs pulled from | This Revision | 13 minutes ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
Implementation
The following is the current implementation of this function.
{
cpu,
vendor,
kernel,
abi,
...
}@sys:
assert isSystem sys;
let
optExecFormat = optionalString (
kernel.name == "netbsd" && gnuNetBSDDefaultExecFormat cpu != kernel.execFormat
) kernel.execFormat.name;
optAbi = optionalString (abi != abis.unknown) "-${abi.name}";
cpuName = if kernel.families ? darwin then darwinArch cpu else cpu.name;
in
"${cpuName}-${vendor.name}-${kernelName kernel}${optExecFormat}${optAbi}"