A library for building Typst documents with Nix. Goals:
- Hermetic document building
- Support non-Typst Universe packages
Usable. Needs a few more things before I'd say it's "complete," but it does build documents.
Just import the overlay.
pkgs = import nixpkgs {
overlays = [ (import press) ];
};
...
document = pkgs.buildTypstDocument {
name = "myDoc";
src = ./.;
};
If you want to use a non-Universe package:
documents = pkgs.buildTypstDocument {
name = "myDoc";
src = ./.;
extraPackages = {
local = [ somePackage anotherPack ];
foospace = [ fooPackage ];
};
};
If you want to use custom fonts:
documents = pkgs.buildTypstDocument {
name = "myDoc";
src = ./.;
fonts = [
pkgs.roboto
];
};
Where local
is the package namespace, and somePackage
is a store path that has a typst.toml
file in it.
You can put packages in whatever namespace you want, not just local.
See the template for more API details.