Skip to content

Commit a7cada4

Browse files
jbgiRossSmyth
authored andcommitted
Add relevant envars to shellHook for tools to use
1 parent 9add51e commit a7cada4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

default.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,19 @@ in
9191
9292
runHook postBuild
9393
'';
94+
95+
# Maybe upstream this?
96+
shellHook = ''
97+
TYPST_PACKAGE_CACHE_PATH="${typstUni}/lib/typst/packages"
98+
TYPST_PACKAGE_PATH="${pkgsDrv}/share/typst/packages"
99+
TYPST_FONT_PATHS="${fontsDrv}/share/fonts"
100+
'';
94101
meta.mainProgram = "typst";
95102
};
96103
in
97104
{
98105
nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [ typstWrap ];
99106
strictDeps = true;
100-
101107
buildPhase =
102108
args.buildPhase or ''
103109
runHook preBuild

template/flake.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
verbose = false;
7878
};
7979

80-
devShells.${system}.default = pkgs.mkShell {
81-
stdenv = pkgs.stdenvNoCC;
80+
devShells.${system}.default = pkgs.mkShellNoCC {
8281
inputsFrom = [ self.packages.${system}.default ];
8382
packages = [
8483
pkgs.tinymist

0 commit comments

Comments
 (0)