diff --git a/modules/hooks.nix b/modules/hooks.nix index 98afee10..9e64c0f0 100644 --- a/modules/hooks.nix +++ b/modules/hooks.nix @@ -594,6 +594,12 @@ in }; }; }; + lacheck = mkOption { + description = lib.mdDoc "lacheck hook"; + type = types.submodule { + imports = [ hookModule ]; + }; + }; lua-ls = mkOption { description = lib.mdDoc "lua-ls hook"; type = types.submodule { @@ -2524,6 +2530,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol package = tools.latexindent; entry = "${hooks.latexindent.package}/bin/latexindent ${hooks.latexindent.settings.flags}"; }; + lacheck = + { + name = "lacheck"; + description = "A consistency checker for LaTeX documents."; + types = [ "file" "tex" ]; + package = tools.lacheck; + entry = "${hooks.lacheck.package}/bin/lacheck"; + }; lua-ls = let # .luarc.json has to be in a directory, diff --git a/nix/tools.nix b/nix/tools.nix index 7b915491..c40c14b2 100644 --- a/nix/tools.nix +++ b/nix/tools.nix @@ -173,6 +173,9 @@ in dune-build-opam-files = callPackage ./dune-build-opam-files { dune = dune_3; inherit (pkgsBuildBuild) ocaml; }; dune-fmt = callPackage ./dune-fmt { dune = dune_3; inherit (pkgsBuildBuild) ocaml; }; latexindent = tex; + lacheck = texlive.combine { + inherit (texlive) lacheck scheme-basic; + }; chktex = tex; commitizen = commitizen.overrideAttrs (_: _: { doCheck = false; }); bats = if bats ? withLibraries then (bats.withLibraries (p: [ p.bats-support p.bats-assert p.bats-file ])) else bats;