From 0fb883e4117abf68b9e2fcd10ab7585cd61413d9 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 6 Jan 2025 15:53:45 -0800 Subject: [PATCH] feat: add package.nix for math 8 course notes --- .../by-course/math-8/course-notes/package.nix | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 documents/by-course/math-8/course-notes/package.nix diff --git a/documents/by-course/math-8/course-notes/package.nix b/documents/by-course/math-8/course-notes/package.nix new file mode 100644 index 0000000..7879e7e --- /dev/null +++ b/documents/by-course/math-8/course-notes/package.nix @@ -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; + } +)