diff --git a/pkgs/os-specific/gnu/mach/default.nix b/pkgs/os-specific/gnu/mach/default.nix
index 49f1f4883a3..7949f5e8e45 100644
--- a/pkgs/os-specific/gnu/mach/default.nix
+++ b/pkgs/os-specific/gnu/mach/default.nix
@@ -1,5 +1,5 @@
 { fetchgit, stdenv, mig ? null, autoconf, automake, texinfo
-, headersOnly ? true }:
+, headersOnly ? false }:
 
 assert (!headersOnly) -> (mig != null);
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation ({
 
   configureFlags = "--build=i586-pc-gnu";
 
-  buildInputs = [ autoconf automake texinfo ]
+  buildNativeInputs = [ autoconf automake texinfo ]
     ++ stdenv.lib.optional (mig != null) mig;
 
   preConfigure = "autoreconf -vfi";
@@ -41,6 +41,7 @@ stdenv.mkDerivation ({
     homepage = http://www.gnu.org/software/hurd/microkernel/mach/gnumach.html;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = [ "i586-gnu" ];
   };
 }
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b9ac594e402..6e2458b24e0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6571,6 +6571,14 @@ let
     inherit fetchurl stdenv udev;
   };
 
+  # In theory GNU Mach doesn't have to be cross-compiled.  However, since it
+  # has to be built for i586 (it doesn't work on x86_64), one needs a cross
+  # compiler for that host.
+  mach = import ../os-specific/gnu/mach {
+    inherit fetchgit stdenv autoconf texinfo mig;
+    automake = automake111x;
+  };
+
   machHeaders = import ../os-specific/gnu/mach {
     inherit fetchgit stdenv autoconf texinfo;
     automake = automake111x;