2008-03-20 16:40:26 +01:00
|
|
|
args : with args;
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
2008-04-08 20:00:47 +02:00
|
|
|
url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2007.dfsg.1.orig.tar.gz;
|
|
|
|
sha256 = "17wdn9vl4pa897046jpzxl6bl2ppr7swwb8x0jafwvbcnmywndag";
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
texmfSrc = fetchurl {
|
|
|
|
url = mirror://debian/pool/main/t/texlive-base/texlive-base_2007.orig.tar.gz;
|
|
|
|
sha256 = "16a4dyliidk43qj0m4gpsl9ln7nqsdcdx1lkbk4wrm03xpx87zvh";
|
|
|
|
};
|
2008-03-20 10:52:08 +01:00
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
langTexmfSrc = fetchurl {
|
|
|
|
url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2007.orig.tar.gz;
|
|
|
|
sha256 = "0cmd9ryd57rzzg7g2gm3qn4ijakkacy810h5zncqd39p3i1yn6nx";
|
|
|
|
};
|
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
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
doPreConfigure = FullDepEntry (''
|
|
|
|
ensureDir $out
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
cp ${setupHook} $out/nix-support/setup-hook.sh
|
|
|
|
ensureDir $out/share
|
|
|
|
tar xf ${texmfSrc} -C $out/share --strip-components=1
|
|
|
|
tar xf ${langTexmfSrc} -C $out/share --strip-components=1
|
|
|
|
cp -r texmf* $out/share
|
|
|
|
cd build/source
|
|
|
|
sed -e s@/usr/bin/@@g -i $(grep /usr/bin/ -rl . )
|
|
|
|
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 . )
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
|
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${icu}/include/layout";
|
|
|
|
'') ["minInit" "doUnpack" "addInputs" "defEnsureDir"];
|
|
|
|
|
|
|
|
doPostInstall = FullDepEntry(''
|
|
|
|
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
|
|
|
|
texmf_var=$(mktemp -d /var/tmp/texmf-varXXXXXXXX)
|
|
|
|
mv $out/share/texmf-var/* $texmf_var/
|
|
|
|
chmod -R a+rwX $texmf_var
|
2008-03-20 21:39:00 +01:00
|
|
|
rm -r $out/share/texmf-var || true
|
|
|
|
rm -r /var/tmp/texmf-var || true
|
2008-03-20 16:40:26 +01:00
|
|
|
ln -sfT $texmf_var $out/share/texmf-var
|
|
|
|
ln -sfT $texmf_var /var/tmp/texmf-var
|
|
|
|
ln -s $out/share/texmf $out/share/texmf-config
|
2008-03-20 21:39:00 +01:00
|
|
|
|
|
|
|
sed -e 's/.*pyhyph.*/=&/' -i $out/share/texmf-config/tex/generic/config/language.dat
|
2008-04-28 02:25:42 +02:00
|
|
|
sed -e 's@^#!env ruby@#! ${ruby}/bin/ruby@' -i $out/libexec/*/*
|
|
|
|
sed -e 's@^#!env perl@#! ${perl}/bin/perl@' -i $out/libexec/*/*
|
2008-03-20 21:39:00 +01:00
|
|
|
|
|
|
|
PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
|
|
|
|
|
|
|
|
HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees
|
|
|
|
|
2008-03-20 16:40:26 +01:00
|
|
|
PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
|
|
|
|
'') ["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
|
2008-04-28 02:25:42 +02:00
|
|
|
ruby
|
2008-03-20 16:40:26 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [ "--with-x11" "--with-system-zlib"
|
|
|
|
"--with-system-freetype2" "--with-system-t1lib"
|
|
|
|
"--with-system-pnglib" "--with-system-gd"
|
|
|
|
"--with-system-icu" "--with-system-ncurses"
|
|
|
|
"--enable-ipc" "--with-mktexfmt"
|
|
|
|
];
|
|
|
|
|
|
|
|
phaseNames = ["doPreConfigure" "doConfigure"
|
2008-03-22 14:04:04 +01:00
|
|
|
"doMakeInstall" "doPostInstall"];
|
2008-03-20 16:40:26 +01:00
|
|
|
|
|
|
|
name = "texlive-core-2007";
|
|
|
|
meta = {
|
|
|
|
description = "A TeX distribution";
|
2008-03-22 14:04:04 +01:00
|
|
|
srcs = [texmfSrc langTexmfSrc];
|
2008-03-20 16:40:26 +01:00
|
|
|
};
|
2008-03-20 10:52:08 +01:00
|
|
|
}
|
2008-04-08 20:00:47 +02:00
|
|
|
|