1# Build Open Dylan from source using the binary builds to bootstrap.
2{stdenv, fetchgit, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:
3
4stdenv.mkDerivation {
5 name = "opendylan-2016.1pre";
6
7 src = fetchgit {
8 url = "https://github.com/dylan-lang/opendylan";
9 rev = "cd9a8395586d33cc43a8611c1dc0513e69ee82dd";
10 sha256 = "00r1dm7mjy5p4hfm13vc4b6qryap40zinia3y15rhvalc3i2np4b";
11 fetchSubmodules = true;
12 };
13
14 buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
15 opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
16 ];
17
18 preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
19 mkdir -p $TMPDIR/mps
20 tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
21 ./autogen.sh
22 ''
23 else ''
24 ./autogen.sh
25 '';
26
27 configureFlags = [
28 (if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
29 ];
30 buildPhase = "make 3-stage-bootstrap";
31
32 postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";
33
34 meta = {
35 homepage = "https://opendylan.org";
36 description = "A multi-paradigm functional and object-oriented programming language";
37 license = stdenv.lib.licenses.mit;
38 platforms = stdenv.lib.platforms.linux;
39 };
40}