Previously, when using a devShell, Tinymist would fail to find the packages and fonts that are used. This is because the fonts and packages are registered with environment variables in a wrapper. Now these are exposed with a shellHook, so the devShell should properly pick up these environment variables as well now.
Changes
- Expose
TYPST_PACKAGE_CACHE_PATH
(Typst Universe dependencies),TYPST_PACKAGE_PATH
(custom dependencies), andTYPST_FONT_PATHS
(fonts) to the devShell - Support
input
arguments
Key-value arguments on the CLI provided with --input key=value
https://typst.app/docs/reference/foundations/sys/
buildTypstDocument {
name = "inputs";
src = ./.;
inputs = {
language = "en";
name = "John Doe";
};
};
Value of "sys.inputs.language" is #sys.inputs.language
#if sys.inputs.name != "John Doe" {
panic("Expected 'John Doe' in 'sys.inputs.name' but got " + sys.inputs.flag)
}
Huge shout-out to @jbgi for doing most of the legwork for both of these changes!