jeroendehaas / pandoc-flake

A flake for building documents using pandoc and LaTeX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandoc and LaTeX builder for Nix

https://github.com/jeroendehaas/pandoc-flake/actions/workflows/check.yml/badge.svg

Introduction

This flakes provides a few helper functions to build documents using pandoc and LaTeX.

Functions

The flake provides two functions under its lib-attribute

buildPandocEnv

lib.buildPandocEnv {
  system, # System in which to build
    fonts ? (pkgs: []), # pkgs -> [derivation] that selects fonts from nixpkgs
    extraBuildInputs ? (pkgs: [] # pkgs -> [derivation] extra build inputs
    extraTexlivePackages ? (pkgs: [])}: # pkgs -> [derivation] select extra texlive packages

Arguments

  1. The system attribute determines on which system the documents are built.
  2. fonts is a function that selects from font packages from nixpkgs. These are then made available to LuaLaTeX.
  3. extraBuildInputs can be used to select extra dependencies for building documents
  4. extraTexlivePackages can be used to select extra packages to combine into the texlive set

Result

This function reduces to an attribute set of two functions

  • shell is a development shell environment
  • mkDoc a function to create a derivation
    mkDoc = {name, # name of the derivation
              target, # makefile target
              files, # resulting files to be copied into store
              path} # path to source and Makefile
        

forDocs

Is a convenience function to generate the output-attribute for a complete flake.

About

A flake for building documents using pandoc and LaTeX

License:BSD 2-Clause "Simplified" License


Languages

Language:Nix 94.5%Language:Makefile 5.5%