diff --git a/pkgs/misc/tex/nix/default.nix b/pkgs/misc/tex/nix/default.nix index 81dfd8babc83..89db336029c6 100644 --- a/pkgs/misc/tex/nix/default.nix +++ b/pkgs/misc/tex/nix/default.nix @@ -8,6 +8,7 @@ rec { , generatePDF ? true , extraFiles ? [] , compressBlanksInIndex ? true + , packages ? [] }: pkgs.stdenv.mkDerivation { @@ -21,7 +22,7 @@ rec { includes = import (findLaTeXIncludes {inherit rootFile;}); - buildInputs = [ pkgs.tetex pkgs.perl ]; + buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages; }; diff --git a/pkgs/misc/tex/pgf/default.nix b/pkgs/misc/tex/pgf/default.nix new file mode 100644 index 000000000000..06bc711422fd --- /dev/null +++ b/pkgs/misc/tex/pgf/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "pgf-1.10"; + + src = fetchurl { + url = http://heanet.dl.sourceforge.net/sourceforge/pgf/pgf-1.10.tar.gz; + sha256 = "1y605wmjxryphh0y5zgzvdq6xjxb2bjb95j36d4wg1a7n93ksswl"; + }; + + buildPhase = "true"; + installPhase = " + ensureDir $out/share/texmf-nix + cp -prd * $out/share/texmf-nix + "; +} diff --git a/pkgs/misc/tex/tetex/setup-hook.sh b/pkgs/misc/tex/tetex/setup-hook.sh index 435b6948e290..d79c4fae4196 100644 --- a/pkgs/misc/tex/tetex/setup-hook.sh +++ b/pkgs/misc/tex/tetex/setup-hook.sh @@ -1,6 +1,6 @@ addTeXMFPath () { if test -d "$1/share/texmf-nix"; then - export TEXMFNIX="${TEXMFNIX}${TEXMFNIX:+:}$1/share/texmf-nix" + export TEXINPUTS="${TEXINPUTS}${TEXINPUTS:+:}$1/share/texmf-nix//:" fi } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b2e53146084..bfd42af96e7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3122,6 +3122,10 @@ rec { db4 = db45; }; + pgf = import ../misc/tex/pgf { + inherit fetchurl stdenv; + }; + polytable = import ../misc/tex/polytable { inherit fetchurl stdenv tetex lazylist; };