-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
69 lines (63 loc) · 1.86 KB
/
flake.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
inputs = {
# Unstable needed for Emacs+Org with citation support
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
mkShellNoCC = pkgs.mkShell.override {
stdenv = pkgs.stdenvNoCC;
};
tex = pkgs.texlive.combine {
# inherit (pkgs.texlive) scheme-minimal latex-bin latexmk
# topiclongtable;
inherit (pkgs.texlive)
# Bare minimum working packages
# scheme-basic
scheme-minimal
# Compiler binaries
latexmk latex-bin
# Org dependencies
# - default packages and their dependencies
amsmath wrapfig ulem hyperref capt-of infwarerr epstopdf-pkg
# Font
xstring xkeyval carlisle realscripts kastrup fontspec newpx unicode-math lualatex-math
# Theorems
amscls
# Bibliography
biblatex biblatex-iso690
# Diagrams
tikz-cd pgf
# Other utility packages
geometry xcolor tocbibind
# Generating PDF/A-2U
hyperxmp ifmtarg luacode luatexbase oberdiek colorprofiles;
};
env = {
SOURCE_DATE_EPOCH = self.lastModified;
TEXMFHOME = ".cache";
TEXMFVAR = ".cache/texmf-var";
};
in
{
devShells.x86_64-linux.default = mkShellNoCC {
inherit env;
name = "diploma-thesis";
packages = [ tex pkgs.biber ];
};
packages.x86_64-linux.default = pkgs.stdenvNoCC.mkDerivation {
inherit env;
name = "diploma-thesis.pdf";
src = ./.;
buildInputs = [ tex pkgs.biber pkgs.emacs29-nox ];
buildPhase = ''
make Thesis.pdf
'';
installPhase = ''
cp Thesis.pdf $out
'';
};
};
}