feat: add flakeSelf and package.nix for course notes
This commit is contained in:
parent
9d108e3871
commit
1ff976cd36
2 changed files with 38 additions and 0 deletions
37
documents/by-course/pstat-120a/course-notes/package.nix
Normal file
37
documents/by-course/pstat-120a/course-notes/package.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
pkgs,
|
||||
typstPackagesCache,
|
||||
typixLib,
|
||||
cleanTypstSource,
|
||||
flakeSelf,
|
||||
...
|
||||
}:
|
||||
let
|
||||
src = cleanTypstSource ./.;
|
||||
commonArgs = {
|
||||
typstSource = "main.typ";
|
||||
|
||||
fontPaths = [
|
||||
# Add paths to fonts here
|
||||
# "${pkgs.roboto}/share/fonts/truetype"
|
||||
];
|
||||
|
||||
virtualPaths = [
|
||||
# Add paths that must be locally accessible to typst here
|
||||
# {
|
||||
# dest = "icons";
|
||||
# src = "${inputs.font-awesome}/svgs/regular";
|
||||
# }
|
||||
];
|
||||
|
||||
XDG_CACHE_HOME = typstPackagesCache;
|
||||
SOURCE_DATE_EPOCH = builtins.toString flakeSelf.lastModified;
|
||||
};
|
||||
|
||||
in
|
||||
typixLib.buildTypstProject (
|
||||
commonArgs
|
||||
// {
|
||||
inherit src;
|
||||
}
|
||||
)
|
|
@ -66,6 +66,7 @@
|
|||
let
|
||||
alexandriaLib = import ./nix/lib {
|
||||
inherit pkgs typixLib typstPackagesCache;
|
||||
flakeSelf = self;
|
||||
};
|
||||
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue