on master help sign in
tix/docs/default.nix
40 lines 1.2 kB history raw
1{ sources ? import nix/sources.nix }:
2let
3 pkgs = import sources.nixpkgs { };
4 lhs2tex = file:
5 let
6 name = filename file;
7 x = pkgs.runCommand "lhs2Tex-${name}"
8 { } ''
9 mkdir $out
10 ${pkgs.haskellPackages.lhs2tex}/bin/lhs2TeX --output="$out/${name}.tex" ${file}
11 '';
12 in
13 "${x}/${name}.tex";
14 filename = x: builtins.head (pkgs.lib.splitString "." (builtins.baseNameOf x));
15in
16builtins.listToAttrs (map
17 (file':
18 let file = if pkgs.lib.hasSuffix ".lhs" file'.file then lhs2tex file'.file else file'.file;
19 in
20 {
21 name = filename file'.file;
22 value = pkgs.texFunctions.runLaTeX {
23 rootFile = file;
24 # , generatePDF ? true # generate PDF, not DVI
25 # , generatePS ? false # generate PS in addition to DVI
26 extraFiles = file'.extraFiles or [ ];
27 # , compressBlanksInIndex ? true
28 # , packages ? [ ]
29 texPackages = {
30 inherit (pkgs.texlive) scheme-medium IEEEtran polytable lazylist multirow;
31 };
32 # , copySources ? false
33 };
34 })
35 [
36 { file = ./tech_spec.tex; }
37 { file = ./project_proposal.tex; }
38 { file = ./paper.lhs; extraFiles = [ ./bibl.bib ./trfrac.sty ]; }
39 ]