texFunctions: Use modular texlive instead of tetex

+20 -15
+20 -15
pkgs/tools/typesetting/tex/nix/default.nix
··· 10 , extraFiles ? [] 11 , compressBlanksInIndex ? true 12 , packages ? [] 13 , copySources ? false 14 }: 15 16 assert generatePDF -> !generatePS; 17 - 18 pkgs.stdenv.mkDerivation { 19 name = "doc"; 20 - 21 builder = ./run-latex.sh; 22 copyIncludes = ./copy-includes.pl; 23 - 24 inherit rootFile generatePDF generatePS extraFiles 25 compressBlanksInIndex copySources; 26 27 includes = map (x: [x.key (baseNameOf (toString x.key))]) 28 (findLaTeXIncludes {inherit rootFile;}); 29 - 30 - buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages; 31 }; 32 33 ··· 41 42 builtins.genericClosure { 43 startSet = [{key = rootFile;}]; 44 - 45 operator = 46 {key, ...}: 47 ··· 72 73 in pkgs.lib.fold foundDeps [] deps; 74 }; 75 - 76 77 findLhs2TeXIncludes = 78 { rootFile ··· 80 81 builtins.genericClosure { 82 startSet = [{key = rootFile;}]; 83 - 84 operator = 85 {key, ...}: 86 ··· 103 builder = ./dot2pdf.sh; 104 inherit dotGraph fontsConf; 105 buildInputs = [ 106 - pkgs.perl pkgs.tetex pkgs.graphviz 107 ]; 108 }; 109 - 110 111 dot2ps = 112 { dotGraph ··· 117 builder = ./dot2ps.sh; 118 inherit dotGraph; 119 buildInputs = [ 120 - pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript 121 ]; 122 }; 123 ··· 132 includes = map (x: [x.key (baseNameOf (toString x.key))]) 133 (findLhs2TeXIncludes {rootFile = source;}); 134 }; 135 - 136 animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation { 137 name = "dot-frames"; 138 builder = ./animatedot.sh; ··· 163 164 165 # Convert a Postscript file to a PNG image, trimming it so that 166 - # there is no unnecessary surrounding whitespace. 167 postscriptToPNG = 168 { postscript 169 }: ··· 173 inherit postscript; 174 175 buildInputs = [pkgs.imagemagick pkgs.ghostscript]; 176 - 177 buildCommand = '' 178 if test -d $postscript; then 179 input=$(ls $postscript/*.ps) ··· 240 "${pkgs.ghostscript}/share/ghostscript/fonts" 241 ]; 242 }; 243 - 244 }
··· 10 , extraFiles ? [] 11 , compressBlanksInIndex ? true 12 , packages ? [] 13 + , texPackages ? {} 14 , copySources ? false 15 }: 16 17 assert generatePDF -> !generatePS; 18 + 19 + let 20 + tex = pkgs.texlive.combine texPackages; 21 + in 22 + 23 pkgs.stdenv.mkDerivation { 24 name = "doc"; 25 + 26 builder = ./run-latex.sh; 27 copyIncludes = ./copy-includes.pl; 28 + 29 inherit rootFile generatePDF generatePS extraFiles 30 compressBlanksInIndex copySources; 31 32 includes = map (x: [x.key (baseNameOf (toString x.key))]) 33 (findLaTeXIncludes {inherit rootFile;}); 34 + 35 + buildInputs = [ tex pkgs.perl ] ++ packages; 36 }; 37 38 ··· 46 47 builtins.genericClosure { 48 startSet = [{key = rootFile;}]; 49 + 50 operator = 51 {key, ...}: 52 ··· 77 78 in pkgs.lib.fold foundDeps [] deps; 79 }; 80 + 81 82 findLhs2TeXIncludes = 83 { rootFile ··· 85 86 builtins.genericClosure { 87 startSet = [{key = rootFile;}]; 88 + 89 operator = 90 {key, ...}: 91 ··· 108 builder = ./dot2pdf.sh; 109 inherit dotGraph fontsConf; 110 buildInputs = [ 111 + pkgs.perl pkgs.graphviz 112 ]; 113 }; 114 + 115 116 dot2ps = 117 { dotGraph ··· 122 builder = ./dot2ps.sh; 123 inherit dotGraph; 124 buildInputs = [ 125 + pkgs.perl pkgs.graphviz pkgs.ghostscript 126 ]; 127 }; 128 ··· 137 includes = map (x: [x.key (baseNameOf (toString x.key))]) 138 (findLhs2TeXIncludes {rootFile = source;}); 139 }; 140 + 141 animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation { 142 name = "dot-frames"; 143 builder = ./animatedot.sh; ··· 168 169 170 # Convert a Postscript file to a PNG image, trimming it so that 171 + # there is no unnecessary surrounding whitespace. 172 postscriptToPNG = 173 { postscript 174 }: ··· 178 inherit postscript; 179 180 buildInputs = [pkgs.imagemagick pkgs.ghostscript]; 181 + 182 buildCommand = '' 183 if test -d $postscript; then 184 input=$(ls $postscript/*.ps) ··· 245 "${pkgs.ghostscript}/share/ghostscript/fonts" 246 ]; 247 }; 248 + 249 }