1{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
2, darwin
3}:
4
5stdenv.mkDerivation rec {
6 pname = "bigloo";
7 version = "4.3h";
8
9 src = fetchurl {
10 url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz";
11 sha256 = "0fw08096sf8ma2cncipnidnysxii0h0pc7kcqkjhkhdchknp8vig";
12 };
13
14 nativeBuildInputs = [ autoconf automake libtool ];
15
16 buildInputs = lib.optional stdenv.isDarwin
17 darwin.apple_sdk.frameworks.ApplicationServices
18 ;
19
20 propagatedBuildInputs = [ gmp ];
21
22 preConfigure =
23 # For libuv on darwin
24 lib.optionalString stdenv.isDarwin ''
25 export LIBTOOLIZE=libtoolize
26 '' +
27 # Help libgc's configure.
28 '' export CXXCPP="$CXX -E"
29 '';
30
31 patchPhase = ''
32 # Fix absolute paths.
33 sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \
34 -e 's=/tmp=$TMPDIR=g' -i autoconf/* \
35 [Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \
36 */*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \
37 comptime/Cc/cc.scm gc/install-*
38
39 # Make sure we don't change string lengths in the generated
40 # C files.
41 sed -e 's=/bin/rm= rm=g' -e 's=/bin/mv= mv=g' \
42 -i comptime/Cc/cc.c
43 '';
44
45 checkTarget = "test";
46
47 # Hack to avoid TMPDIR in RPATHs.
48 preFixup = ''rm -rf "$(pwd)" '';
49
50 meta = {
51 description = "Efficient Scheme compiler";
52 homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/";
53 license = lib.licenses.gpl2Plus;
54 platforms = lib.platforms.unix;
55 maintainers = with lib.maintainers; [ thoughtpolice ];
56
57 longDescription = ''
58 Bigloo is a Scheme implementation devoted to one goal: enabling
59 Scheme based programming style where C(++) is usually
60 required. Bigloo attempts to make Scheme practical by offering
61 features usually presented by traditional programming languages
62 but not offered by Scheme and functional programming. Bigloo
63 compiles Scheme modules. It delivers small and fast stand alone
64 binary executables. Bigloo enables full connections between
65 Scheme and C programs, between Scheme and Java programs, and
66 between Scheme and C# programs.
67 '';
68 };
69}