2021-01-22 12:25:31 +01:00
|
|
|
{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
|
2021-10-05 05:00:39 +02:00
|
|
|
, darwin, libunistring
|
2020-09-12 21:31:21 +02:00
|
|
|
}:
|
2008-02-08 02:35:01 +01:00
|
|
|
|
2008-04-02 22:54:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "bigloo";
|
2021-08-14 02:34:38 +02:00
|
|
|
version = "4.4b";
|
2008-02-08 02:35:01 +01:00
|
|
|
|
2008-04-02 22:54:42 +02:00
|
|
|
src = fetchurl {
|
2020-09-12 21:31:21 +02:00
|
|
|
url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz";
|
2021-08-14 02:34:38 +02:00
|
|
|
sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488=";
|
2008-04-02 22:54:42 +02:00
|
|
|
};
|
2008-03-11 11:08:19 +01:00
|
|
|
|
2020-09-12 21:31:21 +02:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool ];
|
|
|
|
|
2021-10-05 05:00:39 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2020-09-12 21:31:21 +02:00
|
|
|
darwin.apple_sdk.frameworks.ApplicationServices
|
2021-10-05 05:00:39 +02:00
|
|
|
libunistring
|
|
|
|
];
|
2020-09-12 21:31:21 +02:00
|
|
|
|
2015-01-01 23:55:30 +01:00
|
|
|
propagatedBuildInputs = [ gmp ];
|
2014-10-25 04:58:41 +02:00
|
|
|
|
2011-10-05 23:51:07 +02:00
|
|
|
preConfigure =
|
2020-09-12 21:31:21 +02:00
|
|
|
# For libuv on darwin
|
2021-01-22 12:25:31 +01:00
|
|
|
lib.optionalString stdenv.isDarwin ''
|
2020-09-12 21:31:21 +02:00
|
|
|
export LIBTOOLIZE=libtoolize
|
|
|
|
'' +
|
2011-10-05 23:51:07 +02:00
|
|
|
# Help libgc's configure.
|
2014-12-17 19:11:30 +01:00
|
|
|
'' export CXXCPP="$CXX -E"
|
2011-10-05 23:51:07 +02:00
|
|
|
'';
|
|
|
|
|
2008-04-02 22:54:42 +02:00
|
|
|
patchPhase = ''
|
|
|
|
# Fix absolute paths.
|
|
|
|
sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \
|
2015-01-01 23:55:30 +01:00
|
|
|
-e 's=/tmp=$TMPDIR=g' -i autoconf/* \
|
2021-01-21 01:55:55 +01:00
|
|
|
[Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \
|
|
|
|
*/*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \
|
|
|
|
comptime/Cc/cc.scm gc/install-*
|
2008-04-02 22:54:42 +02:00
|
|
|
|
|
|
|
# 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' \
|
2021-01-21 01:55:55 +01:00
|
|
|
-i comptime/Cc/cc.c
|
2008-04-02 22:54:42 +02:00
|
|
|
'';
|
|
|
|
|
2008-05-29 14:10:10 +02:00
|
|
|
checkTarget = "test";
|
|
|
|
|
2023-08-05 09:23:43 +02:00
|
|
|
# remove forbidden references to $TMPDIR
|
|
|
|
preFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
for f in "$out"/bin/*; do
|
|
|
|
if isELF "$f"; then
|
|
|
|
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
2017-05-16 16:35:52 +02:00
|
|
|
|
2011-10-05 23:51:07 +02:00
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Efficient Scheme compiler";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/";
|
2021-01-22 12:25:31 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice ];
|
2023-03-19 01:59:04 +01:00
|
|
|
broken = stdenv.isDarwin && stdenv.isAarch64; # segfault during build
|
2008-04-02 22:54:42 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
2008-02-08 02:35:01 +01:00
|
|
|
};
|
2008-04-02 22:54:42 +02:00
|
|
|
}
|