Skip to content

Commit

Permalink
check if typstyle exists
Browse files Browse the repository at this point in the history
  • Loading branch information
leana8959 committed Jun 19, 2024
1 parent 6522d75 commit 62e46b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3418,7 +3418,11 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
name = "typstyle";
description = "Beautiful and reliable typst code formatter";
packages = tools.typstyle;
entry = "${hooks.typstyle.package}/bin/typstyle";
entry =
lib.throwIf
(hooks.typstyle.package == null)
"The version of nixpkgs used by pre-commit-hooks.nix must contain typstyle"
"${hooks.typstyle.package}/bin/typstyle";
files = "\\.typ$";
};
vale = {
Expand Down
2 changes: 1 addition & 1 deletion nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
, treefmt
, typos
, typstfmt
, typstyle
, typstyle ? null ## Add in nixpkgs added on commit 800ca60
, zprint
, yamlfmt
, yamllint
Expand Down

0 comments on commit 62e46b4

Please sign in to comment.