Derivations
As paraphrased from the Nix Reference Manual:
A derivation is a specification for running an executable on precisely defined input files to repeatably produce output files at uniquely determined file system paths.
The derivation constructors defined in Typix extend this behavior by running
typst compile
/typst watch
in a context where all the dependencies of your
Typst project (fonts, images, etc.) will be made available to the Typst
compiler, regardless of if they're already present on the system it runs on.
buildTypstProjectLocal
— Returns a derivation for compiling a Typst project and copying the output to the current directory.buildTypstProject
— Returns a derivation for compiling a Typst project.devShell
— Sets up a shell environment that activates withnix develop
ordirenv
.mkTypstDerivation
— A generic derivation constructor for running Typst commands.watchTypstDerivation
— Returns a derivation for a script that watches an input file and recompiles on changes.