-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
flake.nix
31 lines (28 loc) · 1012 Bytes
/
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
{
description = "A report built with Pandoc, XeLaTex and a custom font";
outputs = { self, nixpkgs }: {
packages.x86_64-linux.report = (
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
fonts = pkgs.makeFontsConf { fontDirectories = [ pkgs.dejavu_fonts ]; };
in
pkgs.stdenv.mkDerivation {
name = "XelatexReport";
src = ./.;
buildInputs = with pkgs; [
pandoc
haskellPackages.pandoc-crossref
texlive.combined.scheme-small
];
phases = ["unpackPhase" "buildPhase"];
buildPhase = ''
export FONTCONFIG_FILE=${fonts}
mkdir -p $out
pandoc README.md --filter pandoc-crossref --citeproc --pdf-engine=xelatex -o $out/README.pdf
'';
}
);
defaultPackage.x86_64-linux = self.packages.x86_64-linux.report;
};
}