commit
a6d991ea07
@ -1,38 +1,47 @@
|
|||||||
{ stdenv, fetchurl, cairo, file, pango, glib, gtk
|
{ stdenv, fetchurl, cairo, file, fontconfig, glib, gtk, freefont_ttf
|
||||||
, which, libtool, makeWrapper, libjpeg, libpng
|
, libjpeg, libpng, libtool, makeWrapper, openssl, pango, sqlite, which } :
|
||||||
, fontconfig, liberation_ttf, sqlite, openssl } :
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "racket";
|
pname = "racket";
|
||||||
version = "6.1";
|
version = "6.1.1";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
|
url = "http://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
|
||||||
sha256 = "fde283bf5899bb9266ce721db44631c9bac4a4864a7c3211de413fd9503178c6";
|
sha256 = "090269522d20e7a5ce85d2251a126745746ebf5e87554c05efe03f3b7173da75";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Various racket executables do run-time searches for these.
|
# Various Racket executables do runtime searches for these.
|
||||||
ffiSharedLibs = "${glib}/lib:${cairo}/lib:${pango}/lib:${gtk}/lib:${libjpeg}/lib:${libpng}/lib:${sqlite}/lib:${openssl}/lib";
|
ffiSharedLibs = "${cairo}/lib:${fontconfig}/lib:${glib}/lib:${gtk}/lib:${libjpeg}/lib:"
|
||||||
|
+ "${libpng}/lib:${openssl}/lib:${pango}/lib:${sqlite}/lib";
|
||||||
|
|
||||||
buildInputs = [ file libtool which makeWrapper fontconfig liberation_ttf sqlite ];
|
buildInputs = [ file fontconfig freefont_ttf libtool makeWrapper sqlite which ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export LD_LIBRARY_PATH=${ffiSharedLibs}:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=${ffiSharedLibs}:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
# Chroot builds do not have access to /etc/fonts/fonts.conf, but the Racket bootstrap
|
# Chroot builds do not have access to /etc/fonts/fonts.conf,
|
||||||
# needs a working fontconfig, so here a simple standin is used.
|
# but the Racket bootstrap needs a working fontconfig,
|
||||||
|
# so here a simple temporary stand-in is used.
|
||||||
mkdir chroot-fontconfig
|
mkdir chroot-fontconfig
|
||||||
cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
|
cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
|
||||||
sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
|
sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
|
||||||
echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
|
echo "<dir>${freefont_ttf}</dir>" >> chroot-fontconfig/fonts.conf
|
||||||
echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
|
echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
|
||||||
|
|
||||||
|
# remove extraneous directories from temporary fonts.conf
|
||||||
|
sed -e 's@<dir></dir>@@g' \
|
||||||
|
-e 's@<dir prefix="xdg">fonts</dir>@@g' \
|
||||||
|
-e 's@<dir>~/.fonts</dir>@@g' \
|
||||||
|
-e 's@<cachedir prefix="xdg">fontconfig</cachedir>@@g' \
|
||||||
|
-e 's@<cachedir>~/.fontconfig</cachedir>@@g' \
|
||||||
|
-i chroot-fontconfig/fonts.conf
|
||||||
|
|
||||||
export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
|
export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
sed -e 's@/usr/bin/uname@'"$(which uname)"'@g' -i configure
|
sed -e 's@/usr/bin/uname@'"$(which uname)"'@g' -i configure
|
||||||
sed -e 's@/usr/bin/file@'"$(which file)"'@g' -i foreign/libffi/configure
|
sed -e 's@/usr/bin/file@'"$(which file)"'@g' -i foreign/libffi/configure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--enable-shared" "--enable-lt=${libtool}/bin/libtool" ];
|
configureFlags = [ "--enable-shared" "--enable-lt=${libtool}/bin/libtool" ];
|
||||||
@ -41,25 +50,25 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for p in $(ls $out/bin/) ; do
|
for p in $(ls $out/bin/) ; do
|
||||||
wrapProgram $out/bin/$p --prefix LD_LIBRARY_PATH ":" "${ffiSharedLibs}" ;
|
wrapProgram $out/bin/$p --prefix LD_LIBRARY_PATH ":" "${ffiSharedLibs}";
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Programming language derived from Scheme (formerly called PLT Scheme)";
|
description = "A programmable programming language";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Racket (formerly called PLT Scheme) is a programming language derived
|
Racket is a full-spectrum programming language. It goes beyond
|
||||||
from Scheme. The Racket project has four primary components: the
|
Lisp and Scheme with dialects that support objects, types,
|
||||||
implementation of Racket, a JIT compiler; DrRacket, the Racket program
|
laziness, and more. Racket enables programmers to link
|
||||||
development environment; the TeachScheme! outreach, an attempt to turn
|
components written in different dialects, and it empowers
|
||||||
Computing and Programming into "an indispensable part of the liberal
|
programmers to create new, project-specific dialects. Racket's
|
||||||
arts curriculum"; and PLaneT, Racket's web-based package
|
libraries support applications from web servers and databases to
|
||||||
distribution system for user-contributed packages.
|
GUIs and charts.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
homepage = http://racket-lang.org/;
|
homepage = http://racket-lang.org/;
|
||||||
license = stdenv.lib.licenses.lgpl2Plus; # and licenses of contained libraries
|
license = stdenv.lib.licenses.lgpl3;
|
||||||
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
maintainers = with stdenv.lib.maintainers; [ kkallio henrytill ];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user