diff options
Diffstat (limited to 'lib/systems/parse.nix')
-rw-r--r-- | lib/systems/parse.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 34272b45b8b5..bf21d74b931d 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -68,21 +68,20 @@ rec { isKernelFamily = isType "kernel-family"; kernelFamilies = setTypes "kernel-family" { bsd = {}; - unix = {}; }; isKernel = x: isType "kernel" x; kernels = with execFormats; with kernelFamilies; setTypesAssert "kernel" (x: isExecFormat x.execFormat && all isKernelFamily (attrValues x.families)) { - darwin = { execFormat = macho; families = { inherit unix; }; }; - freebsd = { execFormat = elf; families = { inherit unix bsd; }; }; - hurd = { execFormat = elf; families = { inherit unix; }; }; - linux = { execFormat = elf; families = { inherit unix; }; }; - netbsd = { execFormat = elf; families = { inherit unix bsd; }; }; - none = { execFormat = unknown; families = { inherit unix; }; }; - openbsd = { execFormat = elf; families = { inherit unix bsd; }; }; - solaris = { execFormat = elf; families = { inherit unix; }; }; + darwin = { execFormat = macho; families = { }; }; + freebsd = { execFormat = elf; families = { inherit bsd; }; }; + hurd = { execFormat = elf; families = { }; }; + linux = { execFormat = elf; families = { }; }; + netbsd = { execFormat = elf; families = { inherit bsd; }; }; + none = { execFormat = unknown; families = { }; }; + openbsd = { execFormat = elf; families = { inherit bsd; }; }; + solaris = { execFormat = elf; families = { }; }; windows = { execFormat = pe; families = { }; }; } // { # aliases # TODO(@Ericson2314): Handle these Darwin version suffixes more generally. @@ -164,7 +163,7 @@ rec { mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s)); doubleFromSystem = { cpu, vendor, kernel, abi, ... }: - if vendor == kernels.windows && abi == abis.cygnus + if abi == abis.cygnus then "${cpu.name}-cygwin" else "${cpu.name}-${kernel.name}"; |