{ stdenv, fetchurl, cairo, file, fontconfig, glib, gtk, freefont_ttf , libjpeg, libpng, libtool, makeWrapper, openssl, pango, sqlite, which } : stdenv.mkDerivation rec { pname = "racket"; version = "6.1.1"; name = "${pname}-${version}"; src = fetchurl { url = "http://mirror.racket-lang.org/installers/${version}/${name}-src.tgz"; sha256 = "090269522d20e7a5ce85d2251a126745746ebf5e87554c05efe03f3b7173da75"; }; # Various Racket executables do runtime searches for these. ffiSharedLibs = "${cairo}/lib:${fontconfig}/lib:${glib}/lib:${gtk}/lib:${libjpeg}/lib:" + "${libpng}/lib:${openssl}/lib:${pango}/lib:${sqlite}/lib"; buildInputs = [ file fontconfig freefont_ttf libtool makeWrapper sqlite which ]; preConfigure = '' 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 temporary stand-in is used. mkdir chroot-fontconfig cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf sed -e 's@@@' -i chroot-fontconfig/fonts.conf echo "