-
-
Save erooke/40b016bed6c837034ba8d2b7bb986835 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
sources = import ./nix/sources.nix; | |
pkgs = import sources.nixpkgs {}; | |
rooke = (pkgs.callPackage (import sources.rooke-tex) {}); | |
in | |
pkgs.stdenv.mkDerivation { | |
name = "latex-test"; | |
src = ./src; | |
buildInputs = [ | |
pkgs.nixpkgs-fmt | |
( | |
pkgs.texlive.combine { | |
inherit (pkgs.texlive) | |
scheme-small | |
latexmk | |
; | |
inherit rooke; | |
} | |
) | |
]; | |
phases = [ "unpackPhase" "buildPhase" "installPhase"]; | |
buildPhase = '' | |
latexmk -pdfxe doc.tex | |
''; | |
installPhase ='' | |
cp doc.pdf $out | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, texlive }: | |
let | |
rooke-tex = stdenv.mkDerivation { | |
name = "latex-rooke"; | |
pname = "latex-rooke"; | |
version = "0.0.1"; | |
tlType = "run"; | |
src = ./src; | |
phases = [ "unpackPhase" "installPhase" ]; | |
installPhase = '' | |
path="$out/tex/latex" | |
mkdir -p "$path" | |
cp *.{cls,sty} "$path" | |
''; | |
}; | |
in | |
{ | |
pkgs = builtins.concatLists [ | |
[ rooke-tex ] | |
texlive.memoir.pkgs | |
texlive.algorithms.pkgs | |
texlive.etoolbox.pkgs | |
texlive.fancyhdr.pkgs | |
texlive.enumitem.pkgs | |
texlive.siunitx.pkgs | |
texlive.algorithmicx.pkgs | |
texlive.mathtools.pkgs | |
texlive.amsfonts.pkgs | |
texlive.amscls.pkgs | |
texlive.jknapltx.pkgs | |
texlive.rsfs.pkgs | |
texlive.pgf.pkgs | |
texlive.ifetex.pkgs | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment