23 lines
699 B
Nix
23 lines
699 B
Nix
{
|
|
inputs =
|
|
{
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
self.lfs = true;
|
|
};
|
|
|
|
outputs = inputs: let pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; in
|
|
{
|
|
packages.x86_64-linux.default = pkgs.runCommand "presentation"
|
|
{
|
|
nativeBuildInputs = [(pkgs.typst.withPackages (ps: with ps; [ minimal-presentation xarrow ]))];
|
|
src = ./.;
|
|
env.TYPST_FONT_PATHS = builtins.concatStringsSep ":" (builtins.map (p: "${p}/share/fonts")
|
|
(with pkgs; [ corefonts source-han-serif nerd-fonts.fira-code ]));
|
|
}
|
|
''
|
|
mkdir -p $out
|
|
typst compile $src/main.typ $out/main.pdf
|
|
'';
|
|
};
|
|
}
|