summary refs log tree commit diff
path: root/pkgs/os-specific/gnu/mach/default.nix
blob: 6d2d20687bc6f40a61ceaa37192d96bdeff61095 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ fetchgit, stdenv, mig ? null, autoconf, automake, texinfo
, headersOnly ? false }:

assert (!headersOnly) -> (mig != null);

let
  date = "20120303";
  rev = "2a603e88f86bee88e013c2451eacf076fbcaed81";
in
stdenv.mkDerivation ({
  name = "gnumach${if headersOnly then "-headers" else ""}-${date}";

  src = fetchgit {
    url = "git://git.sv.gnu.org/hurd/gnumach.git";
    sha256 = "6db17d091d410fb573e15ae5d59d860a17d78b2073f605c1dc1473f6f2c25ccc";
    inherit rev;
  };

  configureFlags =
       stdenv.lib.optional headersOnly "--build=i586-pc-gnu"  # cheat

    # Always enable dependency tracking.  See
    # <http://lists.gnu.org/archive/html/bug-hurd/2010-05/msg00137.html>.
    ++ [ "--enable-dependency-tracking" ];

  nativeBuildInputs = [ autoconf automake texinfo ]
    ++ stdenv.lib.optional (mig != null) mig;

  preConfigure = "autoreconf -vfi";

  meta = {
    description = "GNU Mach, the microkernel used by the GNU Hurd";

    longDescription =
      '' GNU Mach is the microkernel that the GNU Hurd system is based on.

         It is maintained by the Hurd developers for the GNU project and
         remains compatible with Mach 3.0.

         The majority of GNU Mach's device drivers are from Linux 2.0.  They
         were added using glue code, i.e., a Linux emulation layer in Mach.
      '';

    license = stdenv.lib.licenses.gpl2Plus;

    homepage = http://www.gnu.org/software/hurd/microkernel/mach/gnumach.html;

    maintainers = [ stdenv.lib.maintainers.ludo ];
    platforms = [ "i586-gnu" ];
  };
}

//

(if headersOnly
 then { buildPhase = ":"; installPhase = "make install-data"; }
 else {}))