-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
40 lines (38 loc) · 873 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ nixpkgs ? import <nixpkgs> { } }:
with nixpkgs;
let
myTexlive = with pkgs.texlive; (combine {
inherit (pkgs.texlive)
scheme-medium
latexmk
cm-unicode hitec
biblatex biber
wrapfig multirow todonotes
booktabs siunitx doi
cleveref catoptions fancyhdr
float ulem datetime glossaries
subfigure
tcolorbox epigraph appendix
fmtcount mfirstuc xfor datatool environ
trimspaces listingsutf8 nextpage;
});
fontsConf = pkgs.makeFontsConf {
fontDirectories = [
"${myTexlive}/share/texmf/"
];
};
in
{
thesis = stdenv.mkDerivation {
name = "ms-thesis.pdf";
buildInputs = [myTexlive];
FONTCONFIG_FILE = fontsConf;
src = ./.;
buildPhase = ''
(cd script && latexmk -xelatex msc-thesis.tex)
'';
installPhase = ''
install -m444 script/msc-thesis.pdf $out
'';
};
}