From 8381de489195b78a2d0a317e23a6ea823618d3fb Mon Sep 17 00:00:00 2001 From: "Marei (peiTeX)" Date: Thu, 23 Feb 2023 20:38:02 +0100 Subject: [PATCH] add whitepaper build to nix flake Co-authored-by: wucke13 --- flake.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/flake.nix b/flake.nix index 85552e7..06fbd4f 100644 --- a/flake.nix +++ b/flake.nix @@ -148,6 +148,42 @@ packages = self.packages.${system}; in { + # + ### Whitepaper ### + # + packages.whitepaper = + let + pkgs = import inputs.nixpkgs-unstable { + inherit system; + }; + tlsetup = (pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-basic acmart amsfonts ccicons + csquotes csvsimple doclicense fancyvrb fontspec gobble + koma-script ifmtarg latexmk lm markdown mathtools minted noto + nunito pgf soul soulutf8 unicode-math lualatex-math + gitinfo2 eso-pic biblatex biblatex-trad biblatex-software + xkeyval xurl xifthen biber; + }); + in + pkgs.stdenvNoCC.mkDerivation { + name = "whitepaper"; + src = ./papers; + nativeBuildInputs = with pkgs; [ + ncurses # tput + python3Packages.pygments + tlsetup # custom tex live scheme + which + ]; + buildPhase = '' + export HOME=$(mktemp -d) + export OSFONTDIR="$(kpsewhich --var-value TEXMF)/fonts/{opentype/public/nunito,truetype/google/noto}" + latexmk -r tex/CI.rc + ''; + installPhase = '' + mkdir -p $out + mv *.pdf readme.md $out/ + ''; + }; #