From eaa509f33a7058bd819f02a1da32c4ed372e6b49 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 22 May 2017 12:42:03 -0400 Subject: stdenv: Rename `isGNU` to `isHurd` as GNU is a userland Elsewhere, things called GNU indeed includes GNU/Linux or GNU/Hurd, but this predicate was defined excluding Linux regardless of userland. --- lib/systems/inspect.nix | 2 +- lib/systems/parse.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 1dcb4af35e6c..380c36c2b9b0 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -19,6 +19,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 +28,6 @@ rec { Arm32 = recursiveUpdate patterns.Arm patterns."32bit"; Arm64 = recursiveUpdate patterns.Arm patterns."64bit"; - }; predicates = mapAttrs' diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index b94caeb57589..34272b45b8b5 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -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" -- cgit 1.4.1