2008-03-20 16:40:26 +01:00
|
|
|
args : with args;
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
2010-02-10 05:38:11 +01:00
|
|
|
url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2009.orig.tar.gz;
|
|
|
|
sha256 = "0ywc8h4jnig53fs0bji2ivw5f9j6zlgdy477jqw7xvpc7migjpw7";
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
texmfSrc = fetchurl {
|
2010-02-10 05:38:11 +01:00
|
|
|
url = mirror://debian/pool/main/t/texlive-base/texlive-base_2009.orig.tar.gz;
|
|
|
|
sha256 = "130z907xcxr10yrzbbmp9l8a00dabvi4bi702s5jxamjzav17cmf";
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
2008-03-20 10:52:08 +01:00
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
langTexmfSrc = fetchurl {
|
2010-02-10 05:38:11 +01:00
|
|
|
url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2009.orig.tar.gz;
|
|
|
|
sha256 = "10shnsc71n95zy9ys938pljdid9ampmc50k4lji9wv53hm14laic";
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
2008-03-20 21:39:00 +01:00
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
2008-03-20 10:52:08 +01:00
|
|
|
|
2010-02-10 05:38:11 +01:00
|
|
|
doMainBuild = fullDepEntry (''
|
2008-03-20 16:40:26 +01:00
|
|
|
ensureDir $out
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
cp ${setupHook} $out/nix-support/setup-hook.sh
|
|
|
|
ensureDir $out/share
|
2010-02-11 06:20:16 +01:00
|
|
|
tar xf ${texmfSrc} -C $out --strip-components=1
|
|
|
|
tar xf ${langTexmfSrc} -C $out --strip-components=1
|
2010-02-10 05:38:11 +01:00
|
|
|
|
2010-02-10 19:16:32 +01:00
|
|
|
sed -e s@/usr/bin/@@g -i $(grep /usr/bin/ -rl . )
|
2010-02-10 05:38:11 +01:00
|
|
|
|
2010-02-10 19:16:32 +01:00
|
|
|
sed -e 's@\<env ruby@${ruby}/bin/ruby@' -i $(grep 'env ruby' -rl . )
|
|
|
|
sed -e 's@\<env perl@${perl}/bin/perl@' -i $(grep 'env perl' -rl . )
|
|
|
|
sed -e 's@\<env python@${python}/bin/python@' -i $(grep 'env python' -rl . )
|
2010-02-10 05:38:11 +01:00
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
sed -e '/ubidi_open/i#include <unicode/urename.h>' -i $(find . -name configure)
|
|
|
|
sed -e s@ncurses/curses.h@curses.h@g -i $(grep ncurses/curses.h -rl . )
|
2009-05-11 01:26:19 +02:00
|
|
|
sed -e '1i\#include <string.h>\n\#include <stdlib.h>' -i $( find libs/teckit -name '*.cpp' -o -name '*.c' )
|
2008-03-20 16:40:26 +01:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
|
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${icu}/include/layout";
|
2010-02-10 05:38:11 +01:00
|
|
|
|
2010-02-10 19:16:32 +01:00
|
|
|
./Build --prefix="$out" --datadir="$out/share" --mandir "$out/share/man" --infodir "$out/share/info" \
|
|
|
|
${args.lib.concatStringsSep " " configureFlags}
|
|
|
|
cd Work
|
2008-03-20 16:40:26 +01:00
|
|
|
'') ["minInit" "doUnpack" "addInputs" "defEnsureDir"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
doPostInstall = fullDepEntry(''
|
2008-03-20 16:40:26 +01:00
|
|
|
mv $out/bin $out/libexec
|
|
|
|
ensureDir $out/bin
|
|
|
|
for i in $out/libexec/*/*; do
|
|
|
|
echo -ne "#! /bin/sh\\n$i \"\$@\"" >$out/bin/$(basename $i)
|
|
|
|
chmod a+x $out/bin/$(basename $i)
|
|
|
|
done
|
2010-02-11 06:20:16 +01:00
|
|
|
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
|
|
|
|
ln -s $out/*texmf* $out/share/
|
2008-03-20 21:39:00 +01:00
|
|
|
|
2010-02-11 06:20:16 +01:00
|
|
|
sed -e 's/.*pyhyph.*/=&/' -i $out/texmf-config/tex/generic/config/language.dat
|
2008-03-20 21:39:00 +01:00
|
|
|
|
2010-02-11 06:20:16 +01:00
|
|
|
PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
2008-03-20 21:39:00 +01:00
|
|
|
|
|
|
|
HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees
|
|
|
|
|
2010-02-11 06:20:16 +01:00
|
|
|
PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
2008-03-20 16:40:26 +01:00
|
|
|
'') ["minInit" "defEnsureDir" "doUnpack" "doMakeInstall"];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib bzip2 ncurses libpng flex bison libX11 libICE
|
|
|
|
xproto freetype t1lib gd libXaw icu ghostscript ed
|
|
|
|
libXt libXpm libXmu libXext xextproto perl libSM
|
2010-02-10 19:16:32 +01:00
|
|
|
ruby expat curl libjpeg python fontconfig
|
2008-03-20 16:40:26 +01:00
|
|
|
];
|
|
|
|
|
2010-02-10 05:38:11 +01:00
|
|
|
configureFlags = [ "--with-x11"
|
2008-03-20 16:40:26 +01:00
|
|
|
"--enable-ipc" "--with-mktexfmt"
|
|
|
|
];
|
|
|
|
|
2010-02-23 20:14:31 +01:00
|
|
|
phaseNames = ["addInputs" (doDump "0") "doMainBuild"
|
|
|
|
(doDump "1")
|
|
|
|
"doMakeInstall" "doPostInstall"];
|
2008-03-20 16:40:26 +01:00
|
|
|
|
2010-02-10 05:38:11 +01:00
|
|
|
name = "texlive-core-2009";
|
2008-03-20 16:40:26 +01:00
|
|
|
meta = {
|
|
|
|
description = "A TeX distribution";
|
2010-02-10 05:38:11 +01:00
|
|
|
maintainers = [ args.lib.maintainers.raskin ];
|
|
|
|
platforms = args.lib.platforms.linux ++ args.lib.platforms.freebsd ;
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
2008-03-20 10:52:08 +01:00
|
|
|
}
|