* modified tetex to support extra .sty's from other packages

* added lazylist and polytable (both tetex packages)
* added lhs2tex ebuild, depending on the two above

svn path=/nixpkgs/trunk/; revision=4609
This commit is contained in:
Andres Löh 2006-01-27 20:51:41 +00:00
parent 8d4e61d096
commit 719217d77a
11 changed files with 166 additions and 0 deletions

View File

@ -0,0 +1,18 @@
source $stdenv/setup
phases="installPhase"
dontMakeInstall="yes"
prefix="$out"
preInstall() {
ensureDir "$out/share/texmf-nix/tex/latex/lazylist"
cp lazylist.sty "$out/share/texmf-nix/tex/latex/lazylist"
}
preInstall=preInstall
genericBuild

View File

@ -0,0 +1,15 @@
{stdenv, fetchurl, tetex}:
stdenv.mkDerivation {
name = "lazylist-1.0a";
builder = ./builder.sh;
src = fetchurl {
url = http://www.iai.uni-bonn.de/~loeh/lhs2tex/lazylist-1.0a.tar.bz2;
md5 = "8ef357df5845bd8d6075fca6e1f214ab";
};
buildInputs = [tetex];
inherit tetex;
}

View File

@ -0,0 +1,21 @@
source $stdenv/setup
phases="installPhase"
dontMakeInstall="yes"
prefix="$out"
preInstall() {
ensureDir "$out/share/texmf-nix/tex/latex/polytable"
ensureDir "$out/share/texmf-nix/doc/latex/polytable"
latex polytable.ins
pdflatex polytable.dtx
pdflatex polytable.dtx
cp polytable.sty "$out/share/texmf-nix/tex/latex/polytable"
cp polytable.pdf "$out/share/texmf-nix/doc/latex/polytable"
}
preInstall=preInstall
genericBuild

View File

@ -0,0 +1,17 @@
{stdenv, fetchurl, tetex, lazylist}:
assert tetex == lazylist.tetex;
stdenv.mkDerivation {
name = "polytable-0.8.2";
builder = ./builder.sh;
src = fetchurl {
url = http://www.iai.uni-bonn.de/~loeh/polytable-0.8.2.tar.gz;
md5 = "c59edf035ae6e19b64b1ae920fea28e7";
};
propagatedBuildInputs = [tetex lazylist];
inherit tetex;
}

View File

@ -17,4 +17,10 @@ configureFlags="\
--with-system-ncurses \
"
postInstall() {
ensureDir "$out/nix-support"
cp $setupHook $out/nix-support/setup-hook
}
postInstall=postInstall
genericBuild

View File

@ -15,4 +15,8 @@ stdenv.mkDerivation {
};
buildInputs = [flex bison zlib libpng ncurses ed];
patches = [./environment.patch];
setupHook = ./setup-hook.sh;
}

View File

@ -0,0 +1,35 @@
diff -rc --exclude=texmf.in tetex-src-3.0.orig/texk/kpathsea/texmf.in-teTeX tetex-src-3.0/texk/kpathsea/texmf.in-teTeX
*** tetex-src-3.0.orig/texk/kpathsea/texmf.in-teTeX 2006-01-27 17:33:11.000000000 +0100
--- tetex-src-3.0/texk/kpathsea/texmf.in-teTeX 2006-01-27 17:38:35.000000000 +0100
***************
*** 104,109 ****
--- 104,115 ----
% TEXMFCONFIG = @texmf@-config
TEXMFCONFIG = $HOME/.texmf-config
+ % TEXMFNIX is supposed to be unset. It's used by the Nix
+ % system to add trees during the build of nix-expressions.
+
+ % TEXMFNIXHOME, for packages in the user environment.
+ TEXMFNIXHOME = $HOME/.nix-profile/share/texmf-nix
+
% Now, list all the texmf trees. If you have multiple trees you can
% use shell brace notation, like this:
% TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
***************
*** 111,117 ****
%
% For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named
% explicitly and before all other trees.
! TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
% The system trees. These are the trees that are shared by all the users.
SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST
--- 117,123 ----
%
% For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named
% explicitly and before all other trees.
! TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFNIX,$TEXMFHOME,$TEXMFNIXHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
% The system trees. These are the trees that are shared by all the users.
SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST

View File

@ -0,0 +1,7 @@
addTeXMFPath () {
if test -d "$1/share/texmf-nix"; then
export TEXMFNIX="${TEXMFNIX}${TEXMFNIX:+:}$1/share/texmf-nix"
fi
}
envHooks=(${envHooks[@]} addTeXMFPath)

View File

@ -244,6 +244,10 @@ rec {
inherit fetchurl stdenv ocaml;
};
lhs2tex = (import ../tools/typesetting/lhs2tex) {
inherit fetchurl stdenv ghc tetex polytable;
};
xmlroff = (import ../tools/typesetting/xmlroff) {
inherit fetchurl stdenv pkgconfig libxml2 libxslt popt;
inherit (gtkLibs) glib pango gtk;
@ -2130,6 +2134,14 @@ rec {
inherit fetchurl stdenv flex bison zlib libpng ncurses ed;
};
lazylist = (import ../misc/tex/lazylist) {
inherit fetchurl stdenv tetex;
};
polytable = (import ../misc/tex/polytable) {
inherit fetchurl stdenv tetex lazylist;
};
ghostscript = (import ../misc/ghostscript) {
inherit fetchurl stdenv libjpeg libpng zlib x11;
x11Support = false;

View File

@ -0,0 +1,12 @@
source $stdenv/setup
postInstall() {
ensureDir "$out/share/doc/$name"
cp doc/Guide2.pdf $out/share/doc/$name
}
postInstall=postInstall
genericBuild

View File

@ -0,0 +1,19 @@
{stdenv, fetchurl, tetex, polytable, ghc}:
assert tetex == polytable.tetex;
stdenv.mkDerivation {
name = "lhs2tex-1.10pre";
builder = ./builder.sh;
src = fetchurl {
url = http://www.iai.uni-bonn.de/~loeh/lhs2tex/lhs2tex-1.10pre.tar.bz2;
md5 = "4fb875cdc0ba8daacc18b97f76aab4bf";
};
buildInputs = [tetex ghc];
propagatedBuildInputs = [polytable];
inherit tetex;
}