summaryrefslogtreecommitdiff
path: root/flake.nix
blob: b4c533481fce7fae479fa6505b271d9c8340cf45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  inputs = {
    nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
  };

  outputs = { self, nixpkgs }: let
    system = "aarch64-darwin";
    pkgs = nixpkgs.legacyPackages.${system};

    fonts = with pkgs; [ gyre-fonts ];
  in {
    devShells.${system} = rec {
      rastertype = pkgs.mkShell {
        packages = [ pkgs.typst ];
        shellHook = ''
          export TYPST_FONT_PATHS="${pkgs.symlinkJoin { name = "rastertype-fonts"; paths = fonts; }}/share/fonts"
          export TYPST_IGNORE_SYSTEM_FONTS=true
          export TYPST_IGNORE_EMBEDDED_FONTS=true
          export TYPST_FEATURES=html
        '';
      };
      default = rastertype;
    };
  };
}