Merge pull request #25997 from obsidiansystems/isHurd

stdenv: Rename `isGNU` to `isHurd` as GNU is a userland
This commit is contained in:
John Ericson
2017-05-22 19:02:49 -04:00
committed by GitHub
12 changed files with 54 additions and 65 deletions

View File

@@ -7,6 +7,7 @@ rec {
"64bit" = { cpu = { bits = 64; }; };
i686 = { cpu = cpuTypes.i686; };
x86_64 = { cpu = cpuTypes.x86_64; };
x86 = { cpu = { family = "x86"; }; };
Arm = { cpu = { family = "arm"; }; };
Mips = { cpu = { family = "mips"; }; };
BigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
@@ -19,6 +20,7 @@ rec {
Linux = { kernel = kernels.linux; };
SunOS = { kernel = kernels.solaris; };
FreeBSD = { kernel = kernels.freebsd; };
Hurd = { kernel = kernels.hurd; };
NetBSD = { kernel = kernels.netbsd; };
OpenBSD = { kernel = kernels.openbsd; };
Windows = { kernel = kernels.windows; };
@@ -27,7 +29,6 @@ rec {
Arm32 = recursiveUpdate patterns.Arm patterns."32bit";
Arm64 = recursiveUpdate patterns.Arm patterns."64bit";
};
predicates = mapAttrs'

View File

@@ -77,6 +77,7 @@ rec {
{
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; }; };
@@ -113,7 +114,9 @@ rec {
mkSkeletonFromList = l: {
"2" = # We only do 2-part hacks for things Nix already supports
if elemAt l 1 == "cygwin"
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
else if elemAt l 1 == "gnu"
then { cpu = elemAt l 0; kernel = "hurd"; abi = "gnu"; }
else { cpu = elemAt l 0; kernel = elemAt l 1; };
"3" = # Awkwards hacks, beware!
if elemAt l 1 == "apple"