blob: b52d3fa6a31ce659b21b9577a1dee7d2eb89561e (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
, darwin, libunistring
}:
stdenv.mkDerivation rec {
pname = "bigloo";
version = "4.4b";
src = fetchurl {
url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz";
sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488=";
};
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.ApplicationServices
libunistring
];
propagatedBuildInputs = [ gmp ];
preConfigure =
# For libuv on darwin
lib.optionalString stdenv.hostPlatform.isDarwin ''
export LIBTOOLIZE=libtoolize
'' +
# Help libgc's configure.
'' export CXXCPP="$CXX -E"
'';
patchPhase = ''
# Fix absolute paths.
sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \
-e 's=/tmp=$TMPDIR=g' -i autoconf/* \
[Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \
*/*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \
comptime/Cc/cc.scm gc/install-*
# Make sure we don't change string lengths in the generated
# C files.
sed -e 's=/bin/rm= rm=g' -e 's=/bin/mv= mv=g' \
-i comptime/Cc/cc.c
'';
checkTarget = "test";
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
for f in "$out"/bin/*; do
if isELF "$f"; then
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
fi
done
'';
meta = {
description = "Efficient Scheme compiler";
homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ thoughtpolice ];
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault during build
longDescription = ''
Bigloo is a Scheme implementation devoted to one goal: enabling
Scheme based programming style where C(++) is usually
required. Bigloo attempts to make Scheme practical by offering
features usually presented by traditional programming languages
but not offered by Scheme and functional programming. Bigloo
compiles Scheme modules. It delivers small and fast stand alone
binary executables. Bigloo enables full connections between
Scheme and C programs, between Scheme and Java programs, and
between Scheme and C# programs.
'';
};
}
|