Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. with import <nixpkgs> {};
  2.  
  3. let
  4. eisvogel = pkgs.fetchFromGitHub {
  5. owner = "Wandmalfarbe";
  6. repo = "pandoc-latex-template";
  7. rev = "40b00f300237780f2f5486ca88a18d987ad6bcd2";
  8. sha256 = "0g8ljzz4qacvjp38c3d5hraxgm93bxxsb8qkjj61b18ia4jnysxp";
  9. };
  10.  
  11. # What am I doing wrong here?
  12. pandoc-include-code = pkgs.haskell.lib.dontCheck pkgs.haskellPackages.pandoc-include-code;
  13. in
  14.  
  15. stdenv.mkDerivation {
  16. name = "pdf";
  17.  
  18. src = ./.;
  19.  
  20. buildInputs = [
  21. pandoc
  22. pandoc-include-code
  23. texlive.combined.scheme-full
  24. ];
  25. buildPhase = ''
  26. pandoc main.md \
  27. --filter pandoc-include-code
  28. --from markdown \
  29. --template ${eisvogel}/eisvogel.tex \
  30. --listings \
  31. --toc \
  32. -o result.pdf
  33. '';
  34. installPhase = ''
  35. mkdir $out
  36. mv result.pdf $out
  37. '';
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement