From d1fdc85cc63118cdf91994cf4fb31a3b737328cc Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 10 Nov 2024 02:09:11 -0800 Subject: [PATCH] add package.nix for cheatsheet --- .../as-am-5/midterm-cheatsheet/package.nix | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 2024/documents/by-course/as-am-5/midterm-cheatsheet/package.nix diff --git a/2024/documents/by-course/as-am-5/midterm-cheatsheet/package.nix b/2024/documents/by-course/as-am-5/midterm-cheatsheet/package.nix new file mode 100644 index 0000000..1c9e4f7 --- /dev/null +++ b/2024/documents/by-course/as-am-5/midterm-cheatsheet/package.nix @@ -0,0 +1,35 @@ +{ + pkgs, + typstPackagesCache, + typixLib, + cleanTypstSource, + ... +}: +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; + }; + +in +typixLib.buildTypstProject ( + commonArgs + // { + inherit src; + } +)