2011-02-16 00:48:58 +00:00
|
|
|
{ stdenv, fetchurl, cairo, file, pango, glib, gtk
|
|
|
|
, which, libtool, makeWrapper, libjpeg, libpng
|
|
|
|
, fontconfig, liberation_ttf } :
|
2010-09-21 13:31:11 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2010-10-26 01:22:44 +01:00
|
|
|
pname = "racket";
|
2011-04-30 17:31:19 +01:00
|
|
|
version = "5.1.1";
|
2010-10-26 01:22:44 +01:00
|
|
|
name = "${pname}-${version}";
|
2010-09-21 13:31:11 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-10-26 01:22:44 +01:00
|
|
|
url = "http://download.racket-lang.org/installers/${version}/${pname}/${name}-src-unix.tgz";
|
2011-04-30 17:31:19 +01:00
|
|
|
sha256 = "495ff8b4d73146d9647c2a3f4e491cfe1c2f2d7238366fb1eb99e6a6dd9a0057";
|
2010-09-21 13:31:11 +01:00
|
|
|
};
|
|
|
|
|
2011-02-16 00:48:58 +00:00
|
|
|
# Various racket executables do run-time searches for these.
|
|
|
|
ffiSharedLibs = "${glib}/lib:${cairo}/lib:${pango}/lib:${gtk}/lib:${libjpeg}/lib:${libpng}/lib";
|
|
|
|
|
|
|
|
buildInputs = [ file libtool which makeWrapper fontconfig liberation_ttf ];
|
2010-09-21 13:31:11 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2011-02-16 00:48:58 +00:00
|
|
|
export LD_LIBRARY_PATH=${ffiSharedLibs}:$LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
# Chroot builds do not have access to /etc/fonts/fonts.conf, but the Racket bootstrap
|
|
|
|
# needs a working fontconfig, so here a simple standin is used.
|
|
|
|
mkdir chroot-fontconfig
|
|
|
|
cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
|
|
|
|
sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
|
|
|
|
echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
|
|
|
|
echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
|
|
|
|
|
|
|
|
export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
|
|
|
|
|
2010-09-21 13:31:11 +01:00
|
|
|
cd src
|
|
|
|
sed -e 's@/usr/bin/uname@'"$(which uname)"'@g' -i configure
|
|
|
|
sed -e 's@/usr/bin/file@'"$(which file)"'@g' -i foreign/libffi/configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-shared" "--enable-lt=${libtool}/bin/libtool" ];
|
|
|
|
|
2011-02-16 00:48:58 +00:00
|
|
|
postInstall = ''
|
|
|
|
for p in $(ls $out/bin/) ; do
|
|
|
|
wrapProgram $out/bin/$p --prefix LD_LIBRARY_PATH ":" "${ffiSharedLibs}" ;
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2010-09-21 13:31:11 +01:00
|
|
|
meta = {
|
|
|
|
description = "Racket (formerly called PLT Scheme) is a programming language derived from Scheme.";
|
|
|
|
longDescription = ''
|
|
|
|
Racket (formerly called PLT Scheme) is a programming language derived
|
|
|
|
from Scheme. The Racket project has four primary components: the
|
|
|
|
implementation of Racket, a JIT compiler; DrRacket, the Racket program
|
|
|
|
development environment; the TeachScheme! outreach, an attempt to turn
|
|
|
|
Computing and Programming into "an indispensable part of the liberal
|
|
|
|
arts curriculum"; and PLaneT, Racket's web-based package
|
|
|
|
distribution system for user-contributed packages.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://racket-lang.org/;
|
2010-10-05 17:00:10 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl2Plus;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-09-21 13:31:11 +01:00
|
|
|
};
|
|
|
|
}
|