v2.0: Nixpkgs typstPackages support
Recently, Nixpkgs merged all packages in Typst Universe into the repo.
This is very convenient for me because that means that rather than pulling in the entire Universe repo, the user can not specify what exactly they would like. So here it is
Changes:
- No longer vendor Typst Universe into the nix store for every document
Documents should build much faster now. - [Breaking] Remove unused or deprecated attributes
typstPatches
,typstUniverse
, anduniversePatches
- Add
verbose
attribute
Controls how verbose the Typst compiler session is - Add nice assert messages
- [Breaking] Remove support for all the different datatypes for the
extraPackages
key.
It used to accept a value, a list, an attributeset of values, and an attribute set of lists. Now it only accepts an attribute set of lists.
See the template for full details, but essentially it looks like this now:
pkgs.buildTypstDocument {
name = "foo";
src = ./.;
typstEnv = p: [ p.note-me ];
}
Regressions:
This package does not scan the custom packages pulled in. This means that if you use a custom package that relies on having a Universe package that is not added to typstEnv
, compilation will fail. Tracked in #10